Exemplo n.º 1
0
 /// <summary>
 /// Updates an open container.
 /// </summary>
 /// <param name="localID">The local ID of the container.</param>
 /// <param name="cont">A reference to the container.</param>
 public void UpdateOpenContainer(byte localID, Container cont)
 {
     AddContainerOpen(localID, cont);
 }
Exemplo n.º 2
0
 public Item Clone()
 {
     Item item = null;
     if (itemDict[ItemID].IsOfType(Constants.TYPE_CONTAINER)) {
         string attr = itemDict[ItemID].
         GetAttribute(Constants.ATTRIBUTE_CONTAINER_SIZE);
         byte containerSize = attr == null ? (byte) 0 : byte.Parse(attr);
         item = new Container(ItemID, containerSize);
     } else {
         item = new Item(ItemID);
     }
     Clone(item);
     return item;
 }
Exemplo n.º 3
0
        /// <summary>
        /// Adds a container open to the player's client.
        /// </summary>
        /// <param name="localID">The local ID of the container.</param>
        /// <param name="cont">A reference to the container.</param>
        public void AddContainerOpen(byte localID, Container cont)
        {
            netmsg.AddU16(0x13); //Open container header
            netmsg.AddByte(localID);
            netmsg.AddU16(cont.ItemID);

            foreach (Item item in cont.GetItems())
            {
                AddCarryingItem(item);
            }

            netmsg.AddU16(0xFFFF);
        }