Esempio n. 1
0
        public static ItemLocation FromSlot(Constants.SlotNumber slot)
        {
            ItemLocation loc = new ItemLocation();

            loc.Type = Constants.ItemLocationType.Slot;
            loc.Slot = slot;
            return(loc);
        }
Esempio n. 2
0
        public static ItemLocation1 FromSlot(Constants.SlotNumber s)
        {
            ItemLocation1 j = new ItemLocation1();

            j.Type = Constants.ItemLocationType.Slot;
            j.Slot = s;
            return(j);
        }
Esempio n. 3
0
        /// <summary>
        /// Get the item in the specified slot.
        /// </summary>
        /// <param name="s"></param>
        /// <returns></returns>
        public Item GetItemInSlot(Constants.SlotNumber s)
        {
            uint address = Addresses.Player.SlotHead + 12 * ((uint)s - 1);
            uint id      = client.Memory.ReadUInt32(address);

            if (id > 0)
            {
                byte count = client.Memory.ReadByte(address + Addresses.Player.DistanceSlotCount);
                return(new Item(client, id, count, "", ItemLocation.FromSlot(s)));
            }
            else
            {
                return(null);
            }
        }