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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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())
{