mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix(Core/Items): Don't remove all owned auras on removing enchantments. (#20220)
This commit is contained in:
committed by
GitHub
parent
6b40e51b66
commit
cb241a35e7
@@ -5095,10 +5095,13 @@ void Unit::RemoveAurasDueToItemSpell(uint32 spellId, ObjectGuid castItemGuid)
|
||||
++iter;
|
||||
}
|
||||
|
||||
for (AuraMap::iterator iter = m_ownedAuras.begin(); iter != m_ownedAuras.end();)
|
||||
for (AuraMap::iterator iter = m_ownedAuras.lower_bound(spellId); iter != m_ownedAuras.upper_bound(spellId);)
|
||||
{
|
||||
if (iter->second->GetCastItemGUID() == castItemGuid)
|
||||
RemoveOwnedAura(iter, AURA_REMOVE_BY_DEFAULT);
|
||||
{
|
||||
RemoveOwnedAura(iter, AURA_REMOVE_BY_DEFAULT);
|
||||
iter = m_ownedAuras.lower_bound(spellId);
|
||||
}
|
||||
else
|
||||
++iter;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user