From 21bd906a4d45ef7e87ea3e8b0b6522ed74af43f5 Mon Sep 17 00:00:00 2001 From: carolus21rex <85852042+carolus21rex@users.noreply.github.com> Date: Wed, 14 May 2025 20:50:12 -0400 Subject: [PATCH] [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 --- zone/effects.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zone/effects.cpp b/zone/effects.cpp index 7f0b1eb93..8d8ccb9c9 100644 --- a/zone/effects.cpp +++ b/zone/effects.cpp @@ -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;