mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 05:21:29 +00:00
Fix encounters leaking?
I didn't actually test this ...
This commit is contained in:
parent
11e227756d
commit
bafb199d24
@ -2224,7 +2224,8 @@ void EntityList::RemoveAllObjects()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntityList::RemoveAllTraps(){
|
void EntityList::RemoveAllTraps()
|
||||||
|
{
|
||||||
auto it = trap_list.begin();
|
auto it = trap_list.begin();
|
||||||
while (it != trap_list.end()) {
|
while (it != trap_list.end()) {
|
||||||
safe_delete(it->second);
|
safe_delete(it->second);
|
||||||
@ -2233,6 +2234,16 @@ void EntityList::RemoveAllTraps(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EntityList::RemoveAllEncounters()
|
||||||
|
{
|
||||||
|
auto it = encounter_list.begin();
|
||||||
|
while (it != encounter_list.end()) {
|
||||||
|
safe_delete(it->second);
|
||||||
|
free_ids.push(it->first);
|
||||||
|
it = encounter_list.erase(it);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool EntityList::RemoveMob(uint16 delete_id)
|
bool EntityList::RemoveMob(uint16 delete_id)
|
||||||
{
|
{
|
||||||
if (delete_id == 0)
|
if (delete_id == 0)
|
||||||
@ -2410,6 +2421,7 @@ void EntityList::Clear()
|
|||||||
entity_list.RemoveAllDoors();
|
entity_list.RemoveAllDoors();
|
||||||
entity_list.RemoveAllObjects();
|
entity_list.RemoveAllObjects();
|
||||||
entity_list.RemoveAllRaids();
|
entity_list.RemoveAllRaids();
|
||||||
|
entity_list.RemoveAllEncounters();
|
||||||
entity_list.RemoveAllLocalities();
|
entity_list.RemoveAllLocalities();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -292,6 +292,7 @@ public:
|
|||||||
void RemoveAllObjects();
|
void RemoveAllObjects();
|
||||||
void RemoveAllLocalities();
|
void RemoveAllLocalities();
|
||||||
void RemoveAllRaids();
|
void RemoveAllRaids();
|
||||||
|
void RemoveAllEncounters();
|
||||||
void DestroyTempPets(Mob *owner);
|
void DestroyTempPets(Mob *owner);
|
||||||
int16 CountTempPets(Mob *owner);
|
int16 CountTempPets(Mob *owner);
|
||||||
void AddTempPetsToHateList(Mob *owner, Mob* other, bool bFrenzy = false);
|
void AddTempPetsToHateList(Mob *owner, Mob* other, bool bFrenzy = false);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user