feat(Core/Unit): Optimize AuraEffectList container (#22584)

This commit is contained in:
Takenbacon
2025-07-29 05:10:13 -07:00
committed by GitHub
parent cb580b9865
commit f31643c72c
4 changed files with 9 additions and 9 deletions

View File

@@ -1944,8 +1944,8 @@ bool WorldObject::CanDetectInvisibilityOf(WorldObject const* obj) const
bool isPermInvisibleCreature = false;
if (Creature const* baseObj = ToCreature())
{
auto auraEffects = baseObj->GetAuraEffectsByType(SPELL_AURA_MOD_INVISIBILITY);
for (auto const effect : auraEffects)
Unit::AuraEffectList const& auraEffects = baseObj->GetAuraEffectsByType(SPELL_AURA_MOD_INVISIBILITY);
for (AuraEffect* const effect : auraEffects)
{
if (SpellInfo const* spell = effect->GetSpellInfo())
{