LockDown() public method

public LockDown ( Mobile m, Item item ) : bool
m Mobile
item Item
return bool
Esempio n. 1
0
        public bool OnHouseItemTarget(Mobile from, Item targeted, BaseHouse house)
        {
            if (targeted == null || house == null || !from.Alive || house.Deleted)
                return false;

            if (house.HouseKeyVal != KeyValue)
            {
                from.SendAsciiMessage("You must use the house key to lock down items.");
                return false;
            }
            if (house.IsLockedDown(targeted))
            {
                house.Release(from, targeted);
                from.SendAsciiMessage("The item has been unlocked from the structure.");
                return true;
            }
            if (house.LockDown(from, targeted))
            {
                from.SendAsciiMessage("The item has been locked down.");
                return true;
            }
            
            return false;
        }