예제 #1
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!IsChildOf(from.Backpack))
            {
                from.SendAsciiMessage("That must be in your pack for you to use it.");
                return;
            }

            Guild guild = from.Guild as Guild;

            if (guild == null || guild.Disbanded)
            {
                from.SendAsciiMessage("You need to be in a guild to place a guild container");
                return;
            }

            Mobile leader = guild.Leader;

            if (from != leader)
            {
                from.SendAsciiMessage("You must be the leader of the guild to place a guild container");
                return;
            }

            BaseHouse house = BaseHouse.FindHouseAt(from);

            if (house != null && house.IsOwner(from))
            {
                Delete();

                GuildContainer gc = new GuildContainer();
                gc.MoveToWorld(from.Location, from.Map);
                gc.GuildID = from.Guild.Id;
            }
            else
            {
                from.SendAsciiMessage("You must place this in a house you own");
            }
        }
예제 #2
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!IsChildOf(from.Backpack))
            {
                from.SendAsciiMessage("That must be in your pack for you to use it.");
                return;
            }

            Guild guild = from.Guild as Guild;
            if (guild == null || guild.Disbanded)
            {
                from.SendAsciiMessage("You need to be in a guild to place a guild container");
                return;
            }
            
            Mobile leader = guild.Leader;
            if (from != leader)
            {
                from.SendAsciiMessage("You must be the leader of the guild to place a guild container");
                return;
            }

            BaseHouse house = BaseHouse.FindHouseAt(from);
            if (house != null && house.IsOwner(from))
            {
                Delete();

                GuildContainer gc = new GuildContainer();
                gc.MoveToWorld(from.Location, from.Map);
                gc.GuildID = from.Guild.Id;
            }
            else
                from.SendAsciiMessage("You must place this in a house you own");

        }