コード例 #1
0
ファイル: Chest.cs プロジェクト: Vulttwin/EndlessClient
        /// <summary>
        /// Handler for CHEST_GET packet, sent as confirmation to character that item is being taken
        /// </summary>
        private void _handleChestGet(Packet 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 プロジェクト: Vulttwin/EndlessClient
        /// <summary>
        /// Handler for CHEST_REPLY packet, sent in response to main player adding an item to a chest
        /// </summary>
        private void _handleChestReply(Packet 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);
        }
コード例 #3
0
        private void _chestOpen(ChestData data)
        {
            if (EOChestDialog.Instance == null || data.X != EOChestDialog.Instance.CurrentChestX ||
                data.Y != EOChestDialog.Instance.CurrentChestY)
                return;

            EOChestDialog.Instance.InitializeItems(data.Items);
        }
コード例 #4
0
 private void _chestGetItem(short id, int amount, byte weight, byte maxWeight, ChestData data)
 {
     World.Instance.MainPlayer.ActiveCharacter.UpdateInventoryItem(id, amount, weight, maxWeight);
     EOChestDialog.Instance.InitializeItems(data.Items);
     m_game.Hud.RefreshStats();
 }
コード例 #5
0
 private void _chestAgree(ChestData data)
 {
     if (EOChestDialog.Instance != null)
         EOChestDialog.Instance.InitializeItems(data.Items);
 }
コード例 #6
0
ファイル: Chest.cs プロジェクト: Vulttwin/EndlessClient
        /// <summary>
        /// Handler for CHEST_REPLY packet, sent in response to main player adding an item to a chest
        /// </summary>
        private void _handleChestReply(Packet 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);
        }
コード例 #7
0
ファイル: Chest.cs プロジェクト: Vulttwin/EndlessClient
 /// <summary>
 /// Handler for CHEST_GET packet, sent as confirmation to character that item is being taken
 /// </summary>
 private void _handleChestGet(Packet 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);
 }