diff options
author | Subv <s.v.h21@hotmail.com> | 2012-10-10 15:12:05 -0500 |
---|---|---|
committer | Subv <s.v.h21@hotmail.com> | 2012-10-10 15:12:05 -0500 |
commit | c51f98483732022c87c641dd0feb12a0a401ef95 (patch) | |
tree | 0e339e485fe302b8061104437f29377ed55a104c /src | |
parent | 970009cb3b7e8a3ca0aa1107f70a76e9dc1ecb61 (diff) |
Core/Misc: Only remove auras in arenas for non-gm players.
Closes #7559
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/Battlegrounds/Battleground.cpp | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 8c1b3957b6d..963fd5e2d07 100755 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -523,20 +523,23 @@ inline void Battleground::_ProcessJoin(uint32 diff) player->RemoveAurasDueToSpell(SPELL_ARENA_PREPARATION); player->ResetAllPowers(); - // remove auras with duration lower than 30s - Unit::AuraApplicationMap & auraMap = player->GetAppliedAuras(); - for (Unit::AuraApplicationMap::iterator iter = auraMap.begin(); iter != auraMap.end();) + if (!player->isGameMaster()) { - AuraApplication * aurApp = iter->second; - Aura* aura = aurApp->GetBase(); - if (!aura->IsPermanent() - && aura->GetDuration() <= 30*IN_MILLISECONDS - && aurApp->IsPositive() - && (!(aura->GetSpellInfo()->Attributes & SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY)) - && (!aura->HasEffectType(SPELL_AURA_MOD_INVISIBILITY))) - player->RemoveAura(iter); - else - ++iter; + // remove auras with duration lower than 30s + Unit::AuraApplicationMap & auraMap = player->GetAppliedAuras(); + for (Unit::AuraApplicationMap::iterator iter = auraMap.begin(); iter != auraMap.end();) + { + AuraApplication * aurApp = iter->second; + Aura* aura = aurApp->GetBase(); + if (!aura->IsPermanent() + && aura->GetDuration() <= 30*IN_MILLISECONDS + && aurApp->IsPositive() + && (!(aura->GetSpellInfo()->Attributes & SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY)) + && (!aura->HasEffectType(SPELL_AURA_MOD_INVISIBILITY))) + player->RemoveAura(iter); + else + ++iter; + } } } |