mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-30 01:50:50 +01:00
Updated patch to CatalogBuyItemEvent.
This commit is contained in:
parent
4c16c25508
commit
958c6a6c15
@ -188,12 +188,14 @@ public class CatalogBuyItemEvent extends MessageHandler {
|
|||||||
item = this.client.getHabbo().getHabboStats().getRecentPurchases().get(itemId);
|
item = this.client.getHabbo().getHabboStats().getRecentPurchases().get(itemId);
|
||||||
else
|
else
|
||||||
item = page.getCatalogItem(itemId);
|
item = page.getCatalogItem(itemId);
|
||||||
|
|
||||||
// temp patch, can a dev with better knowledge than me look into this asap pls.
|
// temp patch, can a dev with better knowledge than me look into this asap pls.
|
||||||
if (page instanceof PetsLayout) {
|
if (page instanceof PetsLayout) { // checks it's the petlayout
|
||||||
String check = extraData.replace("\n", "");
|
String[] check = extraData.split("\n"); // splits the extradata
|
||||||
if (!StringUtils.isAlphanumeric(check)) {
|
if (check.length != 3) return; // checks if there's 3 parts (always is with pets, if not it fucks them off)
|
||||||
return;
|
String petName = check[0]; // gets the pet name
|
||||||
|
if (!StringUtils.isAlphanumeric(petName)) { // checks the data to see if it has any nasties.
|
||||||
|
return; // if it does it fucks off.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Emulator.getGameEnvironment().getCatalogManager().purchaseItem(page, item, this.client.getHabbo(), count, extraData, false);
|
Emulator.getGameEnvironment().getCatalogManager().purchaseItem(page, item, this.client.getHabbo(), count, extraData, false);
|
||||||
|
Loading…
Reference in New Issue
Block a user