diff options
| author | tobmaps <spambot42@yandex.ru> | 2011-05-11 03:46:35 +0700 |
|---|---|---|
| committer | tobmaps <spambot42@yandex.ru> | 2011-05-11 03:46:35 +0700 |
| commit | 492e6fd3da39f34e682b080d66bde992a4e4e160 (patch) | |
| tree | ed95bf271d668915350f62a3b06525b8e581b336 | |
| parent | 98dbf64fad000349d6fa40d378bae72e605fe97f (diff) | |
Core/Spells: Fixed exploit with infinity effect of invisibility when applied two invisibility auras at one time
| -rwxr-xr-x | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 87cc2ce0771..fa37ad9daad 100755 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -2814,6 +2814,21 @@ void AuraEffect::HandleModInvisibility(AuraApplication const * aurApp, uint8 mod target->m_invisibility.DelFlag(type); } + else + { + bool found = false; + Unit::AuraEffectList const& invisAuras = target->GetAuraEffectsByType(SPELL_AURA_MOD_INVISIBILITY); + for (Unit::AuraEffectList::const_iterator i = invisAuras.begin(); i != invisAuras.end(); ++i) + { + if (GetMiscValue() == (*i)->GetMiscValue()) + { + found = true; + break; + } + } + if (!found) + target->m_invisibility.DelFlag(type); + } target->m_invisibility.AddValue(type, -GetAmount()); } |
