mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
Changed hate counter to uint32 to prevent negative rollback, this most likely can will be an issue but more uncommon
Renamed and refactored most functions and variables in hate_list.h/cpp for readability Refactored how hate works in some local functions mixing the use of hate variable and split it out into different status variables hate_list.cpp/.h style cleanup hate_list.h header function sort, comment erase functions should clearly state their function
This commit is contained in:
+6
-6
@@ -2556,8 +2556,8 @@ bool Mob::RemoveFromHateList(Mob* mob)
|
||||
bool bFound = false;
|
||||
if(IsEngaged())
|
||||
{
|
||||
bFound = hate_list.RemoveEnt(mob);
|
||||
if(hate_list.IsEmpty())
|
||||
bFound = hate_list.RemoveEntFromHateList(mob);
|
||||
if(hate_list.IsHateListEmpty())
|
||||
{
|
||||
AI_Event_NoLongerEngaged();
|
||||
zone->DelAggroMob();
|
||||
@@ -2565,7 +2565,7 @@ bool Mob::RemoveFromHateList(Mob* mob)
|
||||
}
|
||||
if(GetTarget() == mob)
|
||||
{
|
||||
SetTarget(hate_list.GetTop(this));
|
||||
SetTarget(hate_list.GetEntWithMostHateInRange(this));
|
||||
}
|
||||
|
||||
return bFound;
|
||||
@@ -2575,12 +2575,12 @@ void Mob::WipeHateList()
|
||||
{
|
||||
if(IsEngaged())
|
||||
{
|
||||
hate_list.Wipe();
|
||||
hate_list.WipeHateList();
|
||||
AI_Event_NoLongerEngaged();
|
||||
}
|
||||
else
|
||||
{
|
||||
hate_list.Wipe();
|
||||
hate_list.WipeHateList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3501,7 +3501,7 @@ void Mob::TryTriggerOnValueAmount(bool IsHP, bool IsMana, bool IsEndur, bool IsP
|
||||
}
|
||||
|
||||
else if (IsPet){
|
||||
int count = hate_list.SummonedPetCount(this);
|
||||
int count = hate_list.GetSummonedPetCountOnHateList(this);
|
||||
if ((base2 >= 220 && base2 <= 250) && count >= (base2 - 220)){
|
||||
use_spell = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user