Example #1
0
            public InternalEntry(PlayerMobile from, GuardCaptain guard)
                : base(1152366, 3) // City Banner
            {
                Player = from;
                Guard  = guard;

                Enabled = CityLoyaltySystem.HasCitizenship(from, Guard.City);
            }
Example #2
0
            public override void OnClick()
            {
                CityLoyaltySystem thisSystem  = CityLoyaltySystem.GetCityInstance(Guard.City);
                CityLoyaltySystem theirSystem = CityLoyaltySystem.GetCitizenship(Player);

                Guard.CheckBannerCooldown();

                if (theirSystem != null && thisSystem != null && CityLoyaltySystem.HasCitizenship(Player, Guard.City))
                {
                    if (Guard.IsInBannerCooldown(Player))
                    {
                        Guard.SayTo(Player, 1152364, string.Format("#{0}", CityLoyaltySystem.BannerLocalization(thisSystem.City))); // I have quite a backlog of orders and I cannot satisfy your request for a ~1_ITEM~ right now.
                    }
                    if (theirSystem.GetLoyaltyRating(Player) < LoyaltyRating.Adored)
                    {
                        Guard.SayTo(Player, 1152363, string.Format("#{0}", CityLoyaltySystem.GetCityLocalization(thisSystem.City))); // I apologize, but you are not well-enough renowned in the city of ~1_CITY~ to make this purchase.
                    }
                    else
                    {
                        string args = string.Format("#{0}\t{1}", CityLoyaltySystem.BannerLocalization(thisSystem.City), CityLoyaltySystem.BannerCost.ToString("N0", CultureInfo.GetCultureInfo("en-US")));
                        Player.SendGump(new ConfirmCallbackGump(Player, 1049004, 1152365, Player, args, Guard.OnConfirm));
                    }
                }
            }