/// <summary> /// Handler for CHEST_GET packet, sent as confirmation to character that item is being taken /// </summary> private void _handleChestGet(OldPacket pkt) { if (OnChestGetItem == null) { return; } short takenID = pkt.GetShort(); int takenAmount = pkt.GetThree(); byte characterWeight = pkt.GetChar(); byte characterMaxWeight = pkt.GetChar(); ChestData data = new ChestData(pkt, false); OnChestGetItem(takenID, takenAmount, characterWeight, characterMaxWeight, data); }
/// <summary> /// Handler for CHEST_REPLY packet, sent in response to main player adding an item to a chest /// </summary> private void _handleChestReply(OldPacket pkt) { if (OnChestAddItem == null) { return; } short remainingID = pkt.GetShort(); int remainingAmount = pkt.GetInt(); byte characterWeight = pkt.GetChar(); byte characterMaxWeight = pkt.GetChar(); ChestData data = new ChestData(pkt, false); OnChestAddItem(remainingID, remainingAmount, characterWeight, characterMaxWeight, data); }