fix(Core/Items): Fix exploit where multiple auras could be applied from a single enchantment. (#20128)

This commit is contained in:
Anton Popovichenko
2024-10-04 11:32:42 +02:00
committed by GitHub
parent cc37941ef5
commit 9f58d55a1d

View File

@@ -5075,6 +5075,14 @@ void Unit::RemoveAurasDueToItemSpell(uint32 spellId, ObjectGuid castItemGuid)
else
++iter;
}
for (AuraMap::iterator iter = m_ownedAuras.begin(); iter != m_ownedAuras.end();)
{
if (iter->second->GetCastItemGUID() == castItemGuid)
RemoveOwnedAura(iter, AURA_REMOVE_BY_DEFAULT);
else
++iter;
}
}
void Unit::RemoveAurasByType(AuraType auraType, ObjectGuid casterGUID, Aura* except, bool negative, bool positive)