Esempio n. 1
0
        /// <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);
        }
Esempio n. 2
0
        /// <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);
        }
        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);
        }
 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();
 }
 private void _chestAgree(ChestData data)
 {
     if (EOChestDialog.Instance != null)
         EOChestDialog.Instance.InitializeItems(data.Items);
 }
Esempio n. 6
0
        /// <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);
        }
Esempio n. 7
0
 /// <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);
 }