mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-05 23:56:35 +00:00
[Cleanup] Consolidate GetHateRandom(), GetHateRandomBot(), GetHateRandomClient(), and GetHateRandomNPC() (#3794)
* [Cleanup] Consolidate GetHateRandomBot(), GetHateRandomClient(), and GetHateRandomNPC() # Notes - These were separate methods and duplicated a lot of code, consolidated into the singular method using the `EntityFilterType`. * Simplify random logic. Use filtered hate list. * D * D
This commit is contained in:
+4
-4
@@ -754,10 +754,10 @@ public:
|
||||
NPC* GetHateTopNPC() { return hate_list.GetMobWithMostHateOnList(this, nullptr, false, EntityFilterType::NPCs)->CastToNPC();}
|
||||
Mob* GetSecondaryHate(Mob *skip) { return hate_list.GetMobWithMostHateOnList(this, skip); }
|
||||
Mob* GetHateDamageTop(Mob* other) { return hate_list.GetDamageTopOnHateList(other);}
|
||||
Mob* GetHateRandom() { return hate_list.GetRandomMobOnHateList();}
|
||||
Client* GetHateRandomClient() { return hate_list.GetRandomClientOnHateList(); }
|
||||
NPC* GetHateRandomNPC() { return hate_list.GetRandomNPCOnHateList(); }
|
||||
Bot* GetHateRandomBot() { return hate_list.GetRandomBotOnHateList(); }
|
||||
Mob* GetHateRandom() { return hate_list.GetRandomMobOnHateList(); }
|
||||
Bot* GetHateRandomBot() { return hate_list.GetRandomMobOnHateList(EntityFilterType::Bots)->CastToBot(); }
|
||||
Client* GetHateRandomClient() { return hate_list.GetRandomMobOnHateList(EntityFilterType::Clients)->CastToClient(); }
|
||||
NPC* GetHateRandomNPC() { return hate_list.GetRandomMobOnHateList(EntityFilterType::NPCs)->CastToNPC(); }
|
||||
Mob* GetHateMost() { return hate_list.GetMobWithMostHateOnList();}
|
||||
Mob* GetHateClosest(bool skip_mezzed = false) { return hate_list.GetClosestEntOnHateList(this, skip_mezzed); }
|
||||
Bot* GetHateClosestBot(bool skip_mezzed = false) { return hate_list.GetClosestEntOnHateList(this, skip_mezzed, EntityFilterType::Bots)->CastToBot(); }
|
||||
|
||||
Reference in New Issue
Block a user