mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-07-07 07:25:34 +02:00
Merge branch 'fix/exploit-fixes' into 'dev'
Exploit fixes See merge request morningstar/Arcturus-Community!413
This commit is contained in:
commit
e4a10f5d60
|
@ -21,7 +21,7 @@ public class BuyRoomPromotionEvent extends MessageHandler {
|
||||||
int itemId = this.packet.readInt();
|
int itemId = this.packet.readInt();
|
||||||
int roomId = this.packet.readInt();
|
int roomId = this.packet.readInt();
|
||||||
String title = this.packet.readString();
|
String title = this.packet.readString();
|
||||||
boolean unknown1 = this.packet.readBoolean();
|
boolean extendedPromotion = this.packet.readBoolean();
|
||||||
String description = this.packet.readString();
|
String description = this.packet.readString();
|
||||||
int categoryId = this.packet.readInt();
|
int categoryId = this.packet.readInt();
|
||||||
|
|
||||||
|
@ -30,7 +30,9 @@ public class BuyRoomPromotionEvent extends MessageHandler {
|
||||||
|
|
||||||
CatalogPage page = Emulator.getGameEnvironment().getCatalogManager().getCatalogPage(pageId);
|
CatalogPage page = Emulator.getGameEnvironment().getCatalogManager().getCatalogPage(pageId);
|
||||||
|
|
||||||
if (page != null) {
|
if (page == null || !page.getLayout().equals("roomads"))
|
||||||
|
return;
|
||||||
|
|
||||||
CatalogItem item = page.getCatalogItem(itemId);
|
CatalogItem item = page.getCatalogItem(itemId);
|
||||||
if (item != null) {
|
if (item != null) {
|
||||||
if (this.client.getHabbo().getHabboInfo().canBuy(item)) {
|
if (this.client.getHabbo().getHabboInfo().canBuy(item)) {
|
||||||
|
@ -67,5 +69,4 @@ public class BuyRoomPromotionEvent extends MessageHandler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ public class TradeOfferMultipleItemsEvent extends MessageHandler {
|
||||||
int count = this.packet.readInt();
|
int count = this.packet.readInt();
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
HabboItem item = this.client.getHabbo().getInventory().getItemsComponent().getHabboItem(this.packet.readInt());
|
HabboItem item = this.client.getHabbo().getInventory().getItemsComponent().getHabboItem(this.packet.readInt());
|
||||||
if (item != null) {
|
if (item != null && item.getBaseItem().allowTrade()) {
|
||||||
items.add(item);
|
items.add(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user