PvP/Dueling: Fix an edge case crash that could happen if a duel ended while an aura effect was being removed (Living Bomb, Unstable Affliction and similar). Closes #17177.

This commit is contained in:
treeston authored and Aokromes committed 2016-07-20 15:49:23 +02:00
1 parent d7d6b76ffb
commit 08b78720bb
1 file changed
+2 -2
+2 -2
View File
@@ -7581,7 +7581,7 @@ void Player::DuelComplete(DuelCompleteType type)
for (AuraApplicationMap::iterator i = itsAuras.begin(); i != itsAuras.end();)
{
Aura const* aura = i->second->GetBase();
if (!i->second->IsPositive() && aura->GetCasterGUID() == GetGUID() && aura->GetApplyTime() >= duel->startTime)
if (!i->second->GetRemoveMode() && !i->second->IsPositive() && aura->GetCasterGUID() == GetGUID() && aura->GetApplyTime() >= duel->startTime)
duel->opponent->RemoveAura(i);
else
++i;
@@ -7591,7 +7591,7 @@ void Player::DuelComplete(DuelCompleteType type)
for (AuraApplicationMap::iterator i = myAuras.begin(); i != myAuras.end();)
{
Aura const* aura = i->second->GetBase();
if (!i->second->IsPositive() && aura->GetCasterGUID() == duel->opponent->GetGUID() && aura->GetApplyTime() >= duel->startTime)
if (!i->second->GetRemoveMode() && !i->second->IsPositive() && aura->GetCasterGUID() == duel->opponent->GetGUID() && aura->GetApplyTime() >= duel->startTime)
RemoveAura(i);
else
++i;