Ejemplo n.º 1
0
        public override void OnTeamMemberRemoved(PvPTeam team, PlayerMobile pm)
        {
            base.OnTeamMemberRemoved(team, pm);

            if (IncognitoMode)
            {
                pm.SetHairMods(-1, -1);

                pm.BodyMod = 0;
                pm.HueMod  = -1;
                pm.NameMod = null;
                pm.EndAction(typeof(IncognitoSpell));

                BaseArmor.ValidateMobile(pm);
                BaseClothing.ValidateMobile(pm);
            }

            if (ThrowableMode)
            {
                if (_Axes != null && _Axes.ContainsKey(pm))
                {
                    ThrowableAxe axe = _Axes[pm];
                    if (axe != null)
                    {
                        _Axes.Remove(pm);
                        axe.Delete();
                    }
                }
            }

            PvPTemplates.FetchProfile(pm).ClearDelta();
        }
Ejemplo n.º 2
0
        protected override void RegisterSubCommands()
        {
            base.RegisterSubCommands();

            RegisterSubCommand(
                "templates",
                e =>
            {
                PvPTemplates.DisplayManagerGump(e.Mobile);
                return(true);
            },
                "Opens your PvP template manager.",
                "",
                AccessLevel.Player);

            RegisterSubCommand(
                "scoreboard",
                state =>
            {
                if (state == null || state.Mobile == null || state.Mobile.Deleted)
                {
                    return(false);
                }

                SuperGump g = CreateResultsGump(state.Mobile).Send();

                return(true);
            },
                "Displays the battles scores.",
                "",
                AccessLevel.Player);

            RegisterSubCommandAlias("score");
        }
Ejemplo n.º 3
0
        public override void OnAfterTeamMemberResurrected(PvPTeam team, PlayerMobile pm)
        {
            if (UseTemplates)
            {
                PvPTemplates.FetchProfile(pm).ApplyDelta(UseTemplateEquipment);
            }

            base.OnAfterTeamMemberResurrected(team, pm);
        }
Ejemplo n.º 4
0
        public override void OnAfterTeamMemberDeath(PvPTeam team, PlayerMobile pm)
        {
            PvPTemplates.FetchProfile(pm).ClearDelta();

            base.OnAfterTeamMemberDeath(team, pm);
        }
Ejemplo n.º 5
0
        public override void OnTeamMemberAdded(PvPTeam team, PlayerMobile pm)
        {
            if (TeamStats.ContainsKey(pm))
            {
                TeamStats[pm] = team;
            }
            else
            {
                TeamStats.Add(pm, team);
            }

            base.OnTeamMemberAdded(team, pm);

            if (UseTemplates)
            {
                PvPTemplates.FetchProfile(pm).ApplyDelta(UseTemplateEquipment);
            }

            if (IncognitoMode)
            {
                IncogMode(pm);
            }

            if (ThrowableMode)
            {
                if (_Axes == null)
                {
                    _Axes = new Dictionary <PlayerMobile, ThrowableAxe>();
                }
                if (ThrowableID == 0)
                {
                    ThrowableID = 0x13FB;
                }
                if (ThrowableHue == 0)
                {
                    ThrowableHue = 1161;
                }
                var Axe = new ThrowableAxe
                {
                    Movable = false,
                    ItemID  = ThrowableID,
                };
                if (Utility.RandomDouble() <= 0.1)
                {
                    Axe.Name   = "Stone Chair";
                    Axe.ItemID = 4632;
                }
                Axe.EffectID  = Axe.ItemID;
                Axe.Hue       = ThrowableHue;
                Axe.EffectHue = Axe.Hue - 1;
                Axe.Stackable = false;
                if (_Axes != null && !_Axes.ContainsKey(pm))
                {
                    _Axes.Add(pm, Axe);
                }
                if (pm.Backpack != null)
                {
                    pm.AddToBackpack(Axe);
                }
            }
        }