[Hotfix] ScanCloseMobs - Ensure scanning mob has an entity ID

This commit is contained in:
Akkadius 2024-11-10 06:47:42 -06:00
parent 77de9619b5
commit 3f0f95976c

View File

@ -2945,6 +2945,14 @@ void EntityList::RemoveAuraFromMobs(Mob *aura)
// entity list (zone wide)
void EntityList::ScanCloseMobs(Mob *scanning_mob)
{
if (!scanning_mob) {
return;
}
if (scanning_mob->GetID() <= 0) {
return;
}
float scan_range = RuleI(Range, MobCloseScanDistance) * RuleI(Range, MobCloseScanDistance);
// Reserve memory in m_close_mobs to avoid frequent re-allocations if not already reserved.