[Quest API] Add GetHateRandomBot(), GetHateRandomClient(), and GetHateRandomNPC() to Perl/Lua. (#1613)

- Add $mob->GetHateRandomBot() to Perl.
- Add $mob->GetHateRandomClient() to Perl.
- Add $mob->GetHateRandomNPC() to Perl.
- Add mob:GetHateRandomBot() to Lua.
- Add mob:GetHateRandomClient() to Lua.
- Add mob:GetHateRandomNPC() to Lua.
This commit is contained in:
Kinglykrab
2021-10-17 23:41:10 -04:00
committed by GitHub
parent 7823ff5336
commit 3dcddcba04
6 changed files with 248 additions and 1 deletions
+5
View File
@@ -649,6 +649,11 @@ public:
Mob* GetSecondaryHate(Mob *skip) { return hate_list.GetEntWithMostHateOnList(this, skip); }
Mob* GetHateDamageTop(Mob* other) { return hate_list.GetDamageTopOnHateList(other);}
Mob* GetHateRandom() { return hate_list.GetRandomEntOnHateList();}
Client* GetHateRandomClient() { return hate_list.GetRandomClientOnHateList(); }
NPC* GetHateRandomNPC() { return hate_list.GetRandomNPCOnHateList(); }
#ifdef BOTS
Bot* GetHateRandomBot() { return hate_list.GetRandomBotOnHateList(); }
#endif
Mob* GetHateMost() { return hate_list.GetEntWithMostHateOnList();}
Mob* GetHateClosest() { return hate_list.GetClosestEntOnHateList(this); }
bool IsEngaged() { return(!hate_list.IsHateListEmpty()); }