Exemplo n.º 1
0
        protected override void OnEnter(Character chr)
        {
            base.OnEnter(chr);

            var invitation = chr.Battlegrounds.Invitation;

            if (invitation == null)
            {
                // don't join a team if not invited
                return;
            }

            var team = invitation.Team;

            if (team.Battleground != this)
            {
                // decided for another BG in the meantime
                team.Battleground.TeleportInside(chr);
                return;
            }

            // stop cancel timer
            chr.RemoveUpdateAction(invitation.CancelTimer);

            // Cast the spell "10% Healing Reduction in BG/Arenas"
            chr.SpellCast.TriggerSelf(_healingReductionSpell);

            // join team
            JoinTeam(chr, team);

            BattlegroundHandler.SendStatusActive(chr, this, invitation.QueueIndex);
        }
Exemplo n.º 2
0
        protected override void OnEnter(Character chr)
        {
            base.OnEnter(chr);
            BattlegroundInvitation invitation = chr.Battlegrounds.Invitation;

            if (invitation == null)
            {
                return;
            }
            BattlegroundTeam team = invitation.Team;

            if (team.Battleground != this)
            {
                team.Battleground.TeleportInside(chr);
            }
            else
            {
                chr.RemoveUpdateAction((ObjectUpdateTimer)invitation.CancelTimer);
                chr.SpellCast.TriggerSelf(this._healingReductionSpell);
                this.JoinTeam(chr, team);
                BattlegroundHandler.SendStatusActive(chr, this, invitation.QueueIndex);
            }
        }