[Crash] Fix crash bug with pbae and quest scripts spawning mobs (#4884)

If a PBAE is in progress while a mob pops it can cause a crash. Forcing a copy before the ae has a chance to pop a mob should fix the weirdness
This commit is contained in:
carolus21rex 2025-05-14 20:50:12 -04:00 committed by GitHub
parent 138612bc88
commit 21bd906a4d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1125,8 +1125,8 @@ void EntityList::AESpell(
RuleI(Range, MobCloseScanDistance),
distance
);
for (auto& it: caster_mob->GetCloseMobList(distance)) {
auto list = caster_mob->GetCloseMobList(distance);
for (auto& it: list) {
current_mob = it.second;
if (!current_mob) {
continue;