Revert "Updated patch to CatalogBuyItemEvent."

This reverts commit 958c6a6c15
This commit is contained in:
Harmonic 2020-04-29 18:34:11 -04:00
parent 958c6a6c15
commit f9642879e2

View File

@ -188,14 +188,12 @@ 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) { // checks it's the petlayout if (page instanceof PetsLayout) {
String[] check = extraData.split("\n"); // splits the extradata String check = extraData.replace("\n", "");
if (check.length != 3) return; // checks if there's 3 parts (always is with pets, if not it fucks them off) if (!StringUtils.isAlphanumeric(check)) {
String petName = check[0]; // gets the pet name return;
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);