mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
[Bug Fix] NPC Faction War prevention. (#3595)
* [Bug] NPC Faction War prevention. This should assist with prevention of NPC Faction waring. I have been using this code on my server for over 5 years with no coredumps or any noted bugs. This was brought up as users have reported a few events where they can trigger NPC's to fight each other. * Correct a few entries to line up with updated code. * Re-add missing RestTimer functionality
This commit is contained in:
+8
-10
@@ -4888,16 +4888,14 @@ bool Mob::RemoveFromHateList(Mob* mob)
|
||||
return bFound;
|
||||
}
|
||||
|
||||
void Mob::WipeHateList()
|
||||
{
|
||||
if(IsEngaged())
|
||||
{
|
||||
hate_list.WipeHateList();
|
||||
AI_Event_NoLongerEngaged();
|
||||
}
|
||||
else
|
||||
{
|
||||
hate_list.WipeHateList();
|
||||
void Mob::WipeHateList(bool npc_only) {
|
||||
if (IsEngaged()) {
|
||||
hate_list.WipeHateList(npc_only);
|
||||
if (hate_list.IsHateListEmpty()) {
|
||||
AI_Event_NoLongerEngaged();
|
||||
}
|
||||
} else {
|
||||
hate_list.WipeHateList(npc_only);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user