From 492e6fd3da39f34e682b080d66bde992a4e4e160 Mon Sep 17 00:00:00 2001 From: tobmaps Date: Wed, 11 May 2011 03:46:35 +0700 Subject: Core/Spells: Fixed exploit with infinity effect of invisibility when applied two invisibility auras at one time --- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/server/game') 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()); } -- cgit v1.2.3