mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-30 01:50:50 +01:00
Merge branch 'fix/gift-achievement' into 'dev'
#944 Gifting yourself won't progress achievements anymore See merge request morningstar/Arcturus-Community!400
This commit is contained in:
commit
a1bb93a767
@ -336,7 +336,10 @@ public class CatalogBuyItemAsGiftEvent extends MessageHandler {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.client.getHabbo().getHabboInfo().getId() != userId) {
|
||||||
AchievementManager.progressAchievement(this.client.getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("GiftGiver"));
|
AchievementManager.progressAchievement(this.client.getHabbo(), Emulator.getGameEnvironment().getAchievementManager().getAchievement("GiftGiver"));
|
||||||
|
}
|
||||||
|
|
||||||
if (habbo != null) {
|
if (habbo != null) {
|
||||||
habbo.getClient().sendResponse(new AddHabboItemComposer(gift));
|
habbo.getClient().sendResponse(new AddHabboItemComposer(gift));
|
||||||
habbo.getClient().getHabbo().getInventory().getItemsComponent().addItem(gift);
|
habbo.getClient().getHabbo().getInventory().getItemsComponent().addItem(gift);
|
||||||
@ -351,7 +354,9 @@ public class CatalogBuyItemAsGiftEvent extends MessageHandler {
|
|||||||
habbo.getClient().sendResponse(new BubbleAlertComposer(BubbleAlertKeys.RECEIVED_BADGE.key, keys));
|
habbo.getClient().sendResponse(new BubbleAlertComposer(BubbleAlertKeys.RECEIVED_BADGE.key, keys));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.client.getHabbo().getHabboInfo().getId() != userId) {
|
||||||
AchievementManager.progressAchievement(userId, Emulator.getGameEnvironment().getAchievementManager().getAchievement("GiftReceiver"));
|
AchievementManager.progressAchievement(userId, Emulator.getGameEnvironment().getAchievementManager().getAchievement("GiftReceiver"));
|
||||||
|
}
|
||||||
|
|
||||||
if (!this.client.getHabbo().hasPermission(Permission.ACC_INFINITE_CREDITS)) {
|
if (!this.client.getHabbo().hasPermission(Permission.ACC_INFINITE_CREDITS)) {
|
||||||
if (totalCredits > 0) {
|
if (totalCredits > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user