mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
fix(Core/ObjectGuid): prevent creating copies when looping objects (#6852)
This commit is contained in:
@@ -1086,7 +1086,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
for (ObjectGuid const guid : allianceGuardsGUID)
|
||||
for (ObjectGuid const& guid : allianceGuardsGUID)
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, guid))
|
||||
temp->DespawnOrUnsummon();
|
||||
|
||||
@@ -2415,7 +2415,7 @@ public:
|
||||
SaurfangGUID.Clear();
|
||||
}
|
||||
|
||||
for (ObjectGuid const guid : hordeGuardsGUID)
|
||||
for (ObjectGuid const& guid : hordeGuardsGUID)
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, guid))
|
||||
temp->DespawnOrUnsummon();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user