Surprise Box Implementation

- Added showCashInventory after a successful gachapon opening in the CashShopSurpriseHandler.
- Added getItemsSize() condition to check the inventory size before proceeding with the cash shop surprise opening
This commit is contained in:
Channarit Sittiparat
2024-06-13 20:02:40 +07:00
parent 9945d37df8
commit db82cbcfae
2 changed files with 17 additions and 4 deletions

View File

@@ -41,6 +41,7 @@ public class CashShopSurpriseHandler extends AbstractPacketHandler {
if (cssResult != null) {
Item cssItem = cssResult.getLeft(), cssBox = cssResult.getRight();
c.sendPacket(PacketCreator.onCashGachaponOpenSuccess(c.getAccID(), cssBox.getSN(), cssBox.getQuantity(), cssItem, cssItem.getItemId(), cssItem.getQuantity(), true));
c.sendPacket(PacketCreator.showCashInventory(c));
} else {
c.sendPacket(PacketCreator.onCashItemGachaponOpenFailed());
}