Skip to content

Commit

Permalink
fix(Core/Items): Fix exploit where multiple auras could be applied fr…
Browse files Browse the repository at this point in the history
…om a single enchantment. (azerothcore#20128)
  • Loading branch information
walkline authored Oct 4, 2024
1 parent cc37941 commit 9f58d55
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/server/game/Entities/Unit/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9f58d55

Please sign in to comment.