Exemplo n.º 1
0
        private void Replace()
        {
            Container c = Parent as Container;

            if (c != null)
            {
                ElvenDresserDeedEast deed = new ElvenDresserDeedEast();
                c.DropItem(deed);
            }
            else if (Parent == null)
            {
                Server.Multis.BaseHouse house = Server.Multis.BaseHouse.FindHouseAt(this);

                ElvenDresserDeedEast deed = new ElvenDresserDeedEast();
                deed.MoveToWorld(Location, Map);

                deed.IsLockedDown = IsLockedDown;
                deed.IsSecure     = IsSecure;
                deed.Movable      = Movable;

                if (house != null && house.LockDowns.ContainsKey(this))
                {
                    house.LockDowns.Remove(this);
                    house.LockDowns.Add(deed, house.Owner);
                }
                else if (house != null && house.IsSecure(this))
                {
                    house.ReleaseSecure(house.Owner, this);
                    house.AddSecure(house.Owner, deed);
                }
            }

            Delete();
        }
Exemplo n.º 2
0
        private void Replace()
        {
            Container c = this.Parent as Container;

            if (c != null)
            {
                var deed = new ElvenDresserDeedEast();
                c.DropItem(deed);
            }
            else if (this.Parent == null)
            {
                Server.Multis.BaseHouse house = Server.Multis.BaseHouse.FindHouseAt(this);

                var deed = new ElvenDresserDeedEast();
                deed.MoveToWorld(this.Location, this.Map);

                deed.IsLockedDown = IsLockedDown;
                deed.IsSecure     = IsSecure;
                deed.Movable      = Movable;

                if (house != null && house.LockDowns.Contains(this))
                {
                    house.LockDowns.Remove(this);
                    house.LockDowns.Add(deed);
                }
                else if (house != null && house.Secures.Contains(this))
                {
                    house.Secures.Remove(this);
                    house.Secures.Add(deed);
                }
            }

            Delete();
        }