mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-14 16:02:26 +00:00
Some clean up related to the entity_list changes
This commit is contained in:
parent
ce4f4995b5
commit
6a8a6e530b
@ -427,7 +427,6 @@ Client::~Client() {
|
||||
eqs->Close();
|
||||
eqs->ReleaseFromUse();
|
||||
|
||||
//entity_list.RemoveClient(this);
|
||||
UninitializeBuffSlots();
|
||||
}
|
||||
|
||||
|
||||
@ -2031,12 +2031,12 @@ bool EntityList::RemoveMob(uint16 delete_id)
|
||||
|
||||
auto it = mob_list.find(delete_id);
|
||||
if (it != mob_list.end()) {
|
||||
if (npc_list.find(delete_id) != npc_list.end())
|
||||
if (npc_list.count(delete_id))
|
||||
entity_list.RemoveNPC(delete_id);
|
||||
else if (client_list.find(delete_id) != client_list.end())
|
||||
else if (client_list.count(delete_id))
|
||||
entity_list.RemoveClient(delete_id);
|
||||
safe_delete(it->second);
|
||||
if (corpse_list.find(delete_id) == corpse_list.end())
|
||||
if (corpse_list.count(delete_id))
|
||||
free_ids.push(it->first);
|
||||
mob_list.erase(it);
|
||||
return true;
|
||||
@ -2054,7 +2054,7 @@ bool EntityList::RemoveMob(Mob *delete_mob)
|
||||
while (it != mob_list.end()) {
|
||||
if (it->second == delete_mob) {
|
||||
safe_delete(it->second);
|
||||
if (corpse_list.find(it->first) == corpse_list.end())
|
||||
if (corpse_list.count(it->first))
|
||||
free_ids.push(it->first);
|
||||
mob_list.erase(it);
|
||||
return true;
|
||||
|
||||
12
zone/mob.cpp
12
zone/mob.cpp
@ -385,16 +385,6 @@ Mob::Mob(const char* in_name,
|
||||
|
||||
Mob::~Mob()
|
||||
{
|
||||
// Our Entity ID is set to 0 in NPC::Death. This leads to mobs hanging around for a while in
|
||||
// the entity list, even after they have been destroyed. Use our memory pointer to remove the mob
|
||||
// if our EntityID is 0.
|
||||
//
|
||||
/*if(GetID() > 0)
|
||||
entity_list.RemoveMob(GetID());
|
||||
|
||||
else
|
||||
entity_list.RemoveMob(this);*/
|
||||
|
||||
AI_Stop();
|
||||
if (GetPet()) {
|
||||
if (GetPet()->Charmed())
|
||||
@ -402,7 +392,7 @@ Mob::~Mob()
|
||||
else
|
||||
SetPet(0);
|
||||
}
|
||||
|
||||
|
||||
ClearSpecialAbilities();
|
||||
|
||||
EQApplicationPacket app;
|
||||
|
||||
@ -353,7 +353,6 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, float x, float y, float z, float
|
||||
|
||||
NPC::~NPC()
|
||||
{
|
||||
//entity_list.RemoveNPC(GetID());
|
||||
AI_Stop();
|
||||
|
||||
if(proximity != nullptr) {
|
||||
@ -361,9 +360,6 @@ NPC::~NPC()
|
||||
safe_delete(proximity);
|
||||
}
|
||||
|
||||
//clear our spawn limit record if we had one.
|
||||
//entity_list.LimitRemoveNPC(this);
|
||||
|
||||
safe_delete(NPCTypedata_ours);
|
||||
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user