Add tests for CashShopSurpriseHandler
This commit is contained in:
@@ -82,6 +82,11 @@ public class ByteBufInPacket implements InPacket {
|
||||
return byteBuf.readerIndex();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return o instanceof ByteBufInPacket other && byteBuf.equals(other.byteBuf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
final int readerIndex = byteBuf.readerIndex();
|
||||
|
||||
@@ -91,4 +91,9 @@ public class ByteBufOutPacket implements OutPacket {
|
||||
public void skip(int numberOfBytes) {
|
||||
writeBytes(new byte[numberOfBytes]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return o instanceof ByteBufOutPacket other && byteBuf.equals(other.byteBuf);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6480,14 +6480,15 @@ public class PacketCreator {
|
||||
return p;
|
||||
}
|
||||
|
||||
public static Packet onCashGachaponOpenSuccess(int accountid, long sn, int remainingBoxes, Item item, int itemid, int nSelectedItemCount, boolean bJackpot) {
|
||||
public static Packet onCashGachaponOpenSuccess(int accountid, long boxCashId, int remainingBoxes, Item reward,
|
||||
int rewardItemId, int rewardQuantity, boolean bJackpot) {
|
||||
OutPacket p = OutPacket.create(SendOpcode.CASHSHOP_CASH_ITEM_GACHAPON_RESULT);
|
||||
p.writeByte(0xE5); // subopcode thanks to Ubaware
|
||||
p.writeLong(sn);// sn of the box used
|
||||
p.writeLong(boxCashId);
|
||||
p.writeInt(remainingBoxes);
|
||||
addCashItemInformation(p, item, accountid);
|
||||
p.writeInt(itemid);// the itemid of the liSN?
|
||||
p.writeByte(nSelectedItemCount);// the total count now? o.O
|
||||
addCashItemInformation(p, reward, accountid);
|
||||
p.writeInt(rewardItemId);
|
||||
p.writeByte(rewardQuantity); // nSelectedItemCount
|
||||
p.writeBool(bJackpot);// "CashGachaponJackpot"
|
||||
return p;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user