mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-18 23:46:28 +01:00
Fixed UserCatalogItemPurchasedEvent when user already has the badge
This commit is contained in:
parent
d1f18a2154
commit
645e79e41f
@ -1070,9 +1070,6 @@ public class CatalogManager {
|
||||
}
|
||||
}
|
||||
|
||||
UserCatalogItemPurchasedEvent purchasedEvent = new UserCatalogItemPurchasedEvent(habbo, item, itemsList, totalCredits, totalPoints, badges);
|
||||
Emulator.getPluginManager().fireEvent(purchasedEvent);
|
||||
|
||||
if (badgeFound) {
|
||||
habbo.getClient().sendResponse(new AlertPurchaseFailedComposer(AlertPurchaseFailedComposer.ALREADY_HAVE_BADGE));
|
||||
|
||||
@ -1081,6 +1078,9 @@ public class CatalogManager {
|
||||
}
|
||||
}
|
||||
|
||||
UserCatalogItemPurchasedEvent purchasedEvent = new UserCatalogItemPurchasedEvent(habbo, item, itemsList, totalCredits, totalPoints, badges);
|
||||
Emulator.getPluginManager().fireEvent(purchasedEvent);
|
||||
|
||||
if (!free && !habbo.getClient().getHabbo().hasPermission(Permission.ACC_INFINITE_CREDITS)) {
|
||||
if (purchasedEvent.totalCredits > 0) {
|
||||
habbo.getClient().getHabbo().getHabboInfo().addCredits(-purchasedEvent.totalCredits);
|
||||
|
Loading…
Reference in New Issue
Block a user