mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
Fix crash
Whoever made this using dynamic memory should be fired.
This commit is contained in:
parent
0fa5053ad1
commit
26532c03ac
@ -193,6 +193,7 @@ void HateList::AddEntToHateList(Mob *in_entity, int32 in_hate, int32 in_damage,
|
||||
entity->hatelist_damage += (in_damage >= 0) ? in_damage : 0;
|
||||
entity->stored_hate_amount += in_hate;
|
||||
entity->is_entity_frenzy = in_is_entity_frenzied;
|
||||
entity->last_modified = Timer::GetCurrentTime();
|
||||
}
|
||||
else if (iAddIfNotExist) {
|
||||
entity = new struct_HateList;
|
||||
@ -201,6 +202,7 @@ void HateList::AddEntToHateList(Mob *in_entity, int32 in_hate, int32 in_damage,
|
||||
entity->stored_hate_amount = in_hate;
|
||||
entity->is_entity_frenzy = in_is_entity_frenzied;
|
||||
entity->oor_count = 0;
|
||||
entity->last_modified = Timer::GetCurrentTime();
|
||||
list.push_back(entity);
|
||||
parse->EventNPC(EVENT_HATE_LIST, hate_owner->CastToNPC(), in_entity, "1", 0);
|
||||
|
||||
@ -210,7 +212,6 @@ void HateList::AddEntToHateList(Mob *in_entity, int32 in_hate, int32 in_damage,
|
||||
in_entity->CastToClient()->IncrementAggroCount();
|
||||
}
|
||||
}
|
||||
entity->last_modified = Timer::GetCurrentTime();
|
||||
}
|
||||
|
||||
bool HateList::RemoveEntFromHateList(Mob *in_entity)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user