mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-13 02:38:45 +00:00
Minor clean up for HateList
This commit is contained in:
@@ -40,18 +40,6 @@ HateList::~HateList()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// neotokyo: added for frenzy support
|
|
||||||
// checks if target still is in frenzy mode
|
|
||||||
void HateList::CheckFrenzyHate()
|
|
||||||
{
|
|
||||||
auto iterator = list.begin();
|
|
||||||
while(iterator != list.end())
|
|
||||||
{
|
|
||||||
if ((*iterator)->ent->GetHPRatio() >= 20)
|
|
||||||
(*iterator)->bFrenzy = false;
|
|
||||||
++iterator;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void HateList::Wipe()
|
void HateList::Wipe()
|
||||||
{
|
{
|
||||||
@@ -169,8 +157,6 @@ Mob* HateList::GetClosest(Mob *hater) {
|
|||||||
return close;
|
return close;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// neotokyo: a few comments added, rearranged code for readability
|
|
||||||
void HateList::Add(Mob *ent, int32 in_hate, int32 in_dam, bool bFrenzy, bool iAddIfNotExist)
|
void HateList::Add(Mob *ent, int32 in_hate, int32 in_dam, bool bFrenzy, bool iAddIfNotExist)
|
||||||
{
|
{
|
||||||
if(!ent)
|
if(!ent)
|
||||||
|
|||||||
+1
-2
@@ -54,8 +54,7 @@ public:
|
|||||||
Mob *GetDamageTop(Mob *hater);
|
Mob *GetDamageTop(Mob *hater);
|
||||||
// used to check if mob is on hatelist
|
// used to check if mob is on hatelist
|
||||||
bool IsOnHateList(Mob *);
|
bool IsOnHateList(Mob *);
|
||||||
// used to remove or add frenzy hate
|
|
||||||
void CheckFrenzyHate();
|
|
||||||
//Gets the target with the most hate regardless of things like frenzy etc.
|
//Gets the target with the most hate regardless of things like frenzy etc.
|
||||||
Mob* GetMostHate();
|
Mob* GetMostHate();
|
||||||
// Count 'Summoned' pets on hatelist
|
// Count 'Summoned' pets on hatelist
|
||||||
|
|||||||
Reference in New Issue
Block a user