[Crash] Fix spell in AESpell related to beacons (#3659)

This commit is contained in:
Chris Miles 2023-10-29 18:45:24 -05:00 committed by GitHub
parent fef629e1df
commit 0b452f4ec1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 0 deletions

View File

@ -5850,3 +5850,13 @@ void EntityList::DamageArea(
}
}
}
void EntityList::RemoveFromBeacons(Mob *p_mob)
{
for (auto it = beacon_list.begin(); it != beacon_list.end(); ++it) {
if (it->second == p_mob) {
beacon_list.erase(it);
break;
}
}
}

View File

@ -407,6 +407,7 @@ public:
void RemoveFromTargetsFadingMemories(Mob* spell_target, bool RemoveFromXTargets = false, uint32 max_level = 0);
void RemoveFromXTargets(Mob* mob);
void RemoveFromAutoXTargets(Mob* mob);
void RemoveFromBeacons(Mob *p_mob);
void ReplaceWithTarget(Mob* pOldMob, Mob*pNewTarget);
void QueueCloseClients(Mob* sender, const EQApplicationPacket* app, bool ignore_sender=false, float distance=200, Mob* skipped_mob = 0, bool is_ack_required = true, eqFilterType filter=FilterNone);
void QueueClients(Mob* sender, const EQApplicationPacket* app, bool ignore_sender=false, bool ackreq = true);

View File

@ -560,6 +560,7 @@ Mob::~Mob()
entity_list.RemoveMobFromCloseLists(this);
entity_list.RemoveAuraFromMobs(this);
entity_list.RemoveFromBeacons(this);
close_mobs.clear();