예제 #1
0
        public override void OnDoubleClick(Mobile from)
        {
            if (from is BaseCreature)
            {
                from.SendMessage("You can't place a house as a monster!"); // pseudoseer is possessing a monster
                return;
            }
            if (!BaseHouse.CanOwnHouse(from))
            {
                from.SendMessage(38, "You do not meet the requirements to own a house. You must have over " + HouseSystemController._OwnHouseMinSkillsOnAccount + " skill points total across all characters on your account and also have accrued " + UberScriptFunctions.Methods.TIMESPANSTRING(null, HouseSystemController._OwnHouseMinGameTime) + " of game time on your account.");
                return;
            }

            if (!IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(1042001);                   // That must be in your pack for you to use it.
            }
            else if (from.AccessLevel < AccessLevel.GameMaster && BaseHouse.HasAccountHouse(from))
            {
                from.SendLocalizedMessage(501271);                   // You already own a house, you may not place another!
            }
            else
            {
                if (from.CanBeginAction(typeof(HouseDeed)))
                {
                    from.SendLocalizedMessage(1010433); /* House placement cancellation could result in a
                                                         * 60 second delay in the return of your deed.
                                                         */
                    from.RevealingAction();
                    from.Target = new HousePlacementTarget(this);
                }
                else
                {
                    from.SendMessage("You must wait a moment before attempting to place another house!");
                }
            }
        }