Ejemplo n.º 1
0
        /// <summary>Destroys the item at the given slot</summary>
        public bool Destroy(int slot)
        {
            Item obj1 = this.Remove(slot, true);

            if (obj1 == null)
            {
                return(false);
            }
            if (obj1 is WCell.RealmServer.Entities.Container)
            {
                WCell.RealmServer.Entities.Container container = (WCell.RealmServer.Entities.Container)obj1;
                if (!container.BaseInventory.IsEmpty)
                {
                    foreach (Item obj2 in container.BaseInventory)
                    {
                        obj2.Destroy();
                    }
                }
            }

            obj1.DoDestroy();
            return(true);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 16 Initial item slots
 /// </summary>
 public ContainerInventory(Container owner, UpdateFieldId baseField, int slots)
     : base(owner, baseField, slots)
 {
 }