mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 00:18:43 +01:00
Core/Spells: Fixed exploit with infinity effect of invisibility when applied two invisibility auras at one time
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user