Exemple #1
0
        private static void GuildProps_OnCommand(CommandEventArgs e)
        {
            string arg  = e.ArgString.Trim();
            Mobile from = e.Mobile;

            if (arg.Length == 0)
            {
                e.Mobile.Target = new GuildPropsTarget();
            }
            else
            {
                Guild g = null;


                if (int.TryParse(arg, out int id))
                {
                    g = Guild.Find(id) as Guild;
                }

                if (g == null)
                {
                    g = Guild.FindByAbbrev(arg) as Guild;

                    if (g == null)
                    {
                        g = Guild.FindByName(arg) as Guild;
                    }
                }

                if (g != null)
                {
                    from.SendGump(new PropertiesGump(from, g));

                    if (NewGuildSystem && from.AccessLevel >= AccessLevel.GameMaster && from is PlayerMobile)
                    {
                        from.SendGump(new GuildInfoGump((PlayerMobile)from, g));
                    }
                }
            }
        }
Exemple #2
0
        private static void GuildProps_OnCommand(CommandEventArgs e)
        {
            string arg  = e.ArgString.Trim();
            Mobile from = e.Mobile;

            if (arg.Length == 0)
            {
                e.Mobile.Target = new GuildPropsTarget();
            }
            else
            {
                Guild g = null;

                int id;

                if (int.TryParse(arg, out id))
                {
                    g = Guild.Find(id) as Guild;
                }

                if (g == null)
                {
                    g = Guild.FindByAbbrev(arg) as Guild;

                    if (g == null)
                    {
                        g = Guild.FindByName(arg) as Guild;
                    }
                }

                if (g != null)
                {
                    from.SendGump(new PropertiesGump(from, g));
                }
            }
        }