Exemple #1
0
        public override void Remove()
        {
            if (IsMulti)
            {
                ClientCommunication.PostRemoveMulti(this);
            }

            ArrayList rem = new ArrayList(m_Items);

            m_Items.Clear();
            for (int i = 0; i < rem.Count; i++)
            {
                ((Item)rem[i]).Remove();
            }

            Counter.Uncount(this);

            if (m_Parent is Mobile)
            {
                ((Mobile)m_Parent).RemoveItem(this);
            }
            else if (m_Parent is Item)
            {
                ((Item)m_Parent).RemoveItem(this);
            }

            World.RemoveItem(this);
            base.Remove();
        }
Exemple #2
0
        internal override void Remove()
        {
            if (IsMulti)
            {
                ClientCommunication.PostRemoveMulti(this);
            }

            List <Item> rem = new List <Item>(m_Items);

            m_Items.Clear();

            foreach (Item r in rem)
            {
                r.Remove();
            }

            if (m_Parent is Mobile)
            {
                ((Mobile)m_Parent).RemoveItem(this);
            }
            else if (m_Parent is Item)
            {
                ((Item)m_Parent).RemoveItem(this);
            }

            World.RemoveItem(this);
            base.Remove();
        }
Exemple #3
0
 public override void OnPositionChanging(Point3D newPos)
 {
     if (IsMulti && this.Position != Point3D.Zero && newPos != Point3D.Zero && this.Position != newPos)
     {
         ClientCommunication.PostRemoveMulti(this);
         ClientCommunication.PostAddMulti(m_ItemID, newPos);
     }
     base.OnPositionChanging(newPos);
 }