コード例 #1
0
ファイル: Chest.cs プロジェクト: itashi811/EndlessClient
        /// <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);
        }
コード例 #2
0
ファイル: Chest.cs プロジェクト: itashi811/EndlessClient
        /// <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);
        }