public static void SendToolbar(Mobile m)
		{
			ToolbarModule module = m.GetModule(typeof(ToolbarModule)) as ToolbarModule ?? new ToolbarModule(m);

			m.CloseGump(typeof(ToolbarGump));
            m.SendGump(new ToolbarGump(module.ToolbarInfo, m));
		}
Beispiel #2
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!this.IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(1042001);
                return;
            }

            VIPModule module = from.GetModule(typeof(VIPModule)) as VIPModule;

            if (module == null || module.Canceled)
            {
                if (this.Tier == VIPTier.None)
                {
                    if (this.Bonuses != null)
                    {
                        module = new VIPModule(from, this);
                        this.DonatorMessage(from);
                    }
                    else
                    {
                        from.SendMessage("There is something wrong with your deed, please report to a staff member.");
                        this.Name = "Error Deed";
                    }
                }
                else
                {
                    if (this.Tier == VIPTier.Gold)
                    {
                        module = new VIPModule(from, this);
                        from.AccessLevel = AccessLevel.VIP;
                        from.SendMessage("Thanks for donating to become a Gold VIP player!");
                        module.Bonuses.StartBonuses();
                    }
                    else if (this.Tier == VIPTier.Silver)
                    {
                        module = new VIPModule(from, this);
                        from.AccessLevel = AccessLevel.VIP;
                        from.SendMessage("Thanks for donating to become a Silver VIP player!");
                        module.Bonuses.StartBonuses();
                    }
                    else if (this.Tier == VIPTier.Bronze)
                    {
                        module = new VIPModule(from, this);
                        from.AccessLevel = AccessLevel.VIP;
                        from.SendMessage("Thanks for donating to become a Bronze VIP player!");
                        module.Bonuses.StartBonuses();
                    }
                    this.Delete();
                }
            }
        }
Beispiel #3
0
        private static void CheckModule(Mobile from)
        {
            VIPModule module = from.GetModule(typeof(VIPModule)) as VIPModule;

            if (module != null)
                module.Check();
        }
Beispiel #4
0
        public Int32 GetManaRegenModifier(Mobile m)
        {
            if (!Enabled || !Server.Core.AOS)
                return 0;

            FoodEffectModule module = m.GetModule(typeof(FoodEffectModule)) as FoodEffectModule;

            if (module == null)
                return 0;

            return module.GetRegenModifier(FoodEffectRegenType.Hits);
        }