mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 14:41:28 +00:00
Revert "It's never ogre with these hatelist crashes.."
This reverts commit dffee38dc622254a9847e1a09d79c572d1aaf388.
This commit is contained in:
parent
6aa0c9d694
commit
9502f0aadf
@ -3,6 +3,7 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||
== 04/21/2014 ==
|
||||
Secrets: Crash fix for more hatelist crashes.
|
||||
Secrets: Hate list fixes, again.
|
||||
Secrets: Revert of hatelist changes.
|
||||
|
||||
== 04/20/2014 ==
|
||||
Secrets: Changed the functionality of EQDEBUG cmake flag. It now suppresses logs, but shows crashes in any scenario when set to 1. It will also now show crashes even if the log system is disabled.
|
||||
|
||||
@ -223,7 +223,6 @@ Bot::~Bot() {
|
||||
GetPet()->Depop();
|
||||
|
||||
entity_list.RemoveBot(GetID());
|
||||
entity_list.RemoveFromTargets(this, true);
|
||||
}
|
||||
|
||||
void Bot::SetBotID(uint32 botID) {
|
||||
|
||||
@ -426,8 +426,7 @@ Client::~Client() {
|
||||
//let the stream factory know were done with this stream
|
||||
eqs->Close();
|
||||
eqs->ReleaseFromUse();
|
||||
//Moved this from ~Mob, because it could cause a crash in some cases where a hate list was still used and that mob was the only one on the hate list.
|
||||
entity_list.RemoveFromTargets(this, true);
|
||||
|
||||
UninitializeBuffSlots();
|
||||
}
|
||||
|
||||
|
||||
@ -1283,33 +1283,6 @@ void EntityList::RemoveFromTargets(Mob *mob, bool RemoveFromXTargets)
|
||||
}
|
||||
}
|
||||
|
||||
void EntityList::RemoveFromTargets(uint16 MobID, bool RemoveFromXTargets)
|
||||
{
|
||||
Mob* mob = entity_list.GetMob(MobID);
|
||||
|
||||
if(!mob)
|
||||
return;
|
||||
|
||||
auto it = mob_list.begin();
|
||||
while (it != mob_list.end()) {
|
||||
Mob *m = it->second;
|
||||
++it;
|
||||
|
||||
if (!m)
|
||||
continue;
|
||||
|
||||
m->RemoveFromHateList(mob);
|
||||
|
||||
if (RemoveFromXTargets) {
|
||||
if (m->IsClient())
|
||||
m->CastToClient()->RemoveXTarget(mob, false);
|
||||
// FadingMemories calls this function passing the client.
|
||||
else if (mob->IsClient())
|
||||
mob->CastToClient()->RemoveXTarget(m, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EntityList::RemoveFromXTargets(Mob *mob)
|
||||
{
|
||||
auto it = client_list.begin();
|
||||
|
||||
@ -290,7 +290,6 @@ public:
|
||||
void ExpeditionWarning(uint32 minutes_left);
|
||||
|
||||
void RemoveFromTargets(Mob* mob, bool RemoveFromXTargets = false);
|
||||
void RemoveFromTargets(uint16 mob, bool RemoveFromXTargets = false);
|
||||
void RemoveFromXTargets(Mob* mob);
|
||||
void RemoveFromAutoXTargets(Mob* mob);
|
||||
void ReplaceWithTarget(Mob* pOldMob, Mob*pNewTarget);
|
||||
|
||||
@ -205,6 +205,9 @@ void HateList::Add(Mob *ent, int32 in_hate, int32 in_dam, bool bFrenzy, bool iAd
|
||||
|
||||
bool HateList::RemoveEnt(Mob *ent)
|
||||
{
|
||||
if (!ent)
|
||||
return false;
|
||||
|
||||
bool found = false;
|
||||
auto iterator = list.begin();
|
||||
|
||||
|
||||
@ -76,7 +76,6 @@ Merc::Merc(const NPCType* d, float x, float y, float z, float heading)
|
||||
Merc::~Merc() {
|
||||
AI_Stop();
|
||||
entity_list.RemoveMerc(this->GetID());
|
||||
entity_list.RemoveFromTargets(this, true);
|
||||
UninitializeBuffSlots();
|
||||
}
|
||||
|
||||
|
||||
@ -401,6 +401,8 @@ Mob::~Mob()
|
||||
if(!corpse || (corpse && !corpse->IsPlayerCorpse()))
|
||||
entity_list.QueueClients(this, &app, true);
|
||||
|
||||
entity_list.RemoveFromTargets(this, true);
|
||||
|
||||
if(trade) {
|
||||
Mob *with = trade->With();
|
||||
if(with && with->IsClient()) {
|
||||
|
||||
@ -392,8 +392,6 @@ NPC::~NPC()
|
||||
safe_delete(reface_timer);
|
||||
safe_delete(swarmInfoPtr);
|
||||
safe_delete(qGlobals);
|
||||
//Moved this from ~Mob, because it could cause a crash in some cases where a hate list was still used and that mob was the only one on the hate list.
|
||||
entity_list.RemoveFromTargets(this, true);
|
||||
UninitializeBuffSlots();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user