mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-18 23:46:28 +01:00
Merge branch 'user-catalog-purchased-item-event' into 'dev'
Fixed UserCatalogItemPurchasedEvent when user already has the badge See merge request morningstar/Arcturus-Community!330
This commit is contained in:
commit
e10e5da7b5
@ -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