mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +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;
|
++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)
|
if (iter->second->GetCastItemGUID() == castItemGuid)
|
||||||
RemoveOwnedAura(iter, AURA_REMOVE_BY_DEFAULT);
|
{
|
||||||
|
RemoveOwnedAura(iter, AURA_REMOVE_BY_DEFAULT);
|
||||||
|
iter = m_ownedAuras.lower_bound(spellId);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
++iter;
|
++iter;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user