mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
More hatelist fixes. Trying to nail the crash :S
This commit is contained in:
+3
-4
@@ -205,9 +205,6 @@ void HateList::Add(Mob *ent, int32 in_hate, int32 in_dam, bool bFrenzy, bool iAd
|
||||
|
||||
bool HateList::RemoveEnt(Mob *ent)
|
||||
{
|
||||
if (!ent)
|
||||
return NULL;
|
||||
|
||||
bool found = false;
|
||||
auto iterator = list.begin();
|
||||
|
||||
@@ -215,10 +212,12 @@ bool HateList::RemoveEnt(Mob *ent)
|
||||
{
|
||||
if((*iterator)->ent == ent)
|
||||
{
|
||||
if(ent)
|
||||
parse->EventNPC(EVENT_HATE_LIST, owner->CastToNPC(), ent, "0", 0);
|
||||
found = true;
|
||||
|
||||
if(ent->IsClient())
|
||||
|
||||
if(ent && ent->IsClient())
|
||||
ent->CastToClient()->DecrementAggroCount();
|
||||
|
||||
delete (*iterator);
|
||||
|
||||
Reference in New Issue
Block a user