[Quest API] Add GetHateTopBot(), GetHateTopClient(), and GetHateTopNPC() to Perl/Lua (#3793)

# Perl
- Add `$mob->GetHateTopBot()`.
- Add `$mob->GetHateTopClient()`.
- Add `$mob->GetHateTopNPC()`.

# Lua
- Add `mob:GetHateTopBot()`.
- Add `mob:GetHateTopClient()`.
- Add `mob:GetHateTopNPC()`.
This commit is contained in:
Alex King
2023-12-22 03:41:32 -05:00
committed by GitHub
parent 028ebc3a0c
commit e06c7d7735
10 changed files with 161 additions and 95 deletions
+2 -2
View File
@@ -2902,12 +2902,12 @@ void Bot::AcquireBotTarget(Group* bot_group, Raid* raid, Client* leash_owner, fl
}
} else {
// This will keep bots on target for now..but, future updates will allow for rooting/stunning
if (auto escaping = hate_list.GetEscapingEntOnHateList(leash_owner, leash_distance)) {
if (auto escaping = hate_list.GetEscapingMobOnHateList(leash_owner, leash_distance)) {
SetTarget(escaping);
}
if (!GetTarget()) {
auto most_hate = hate_list.GetEntWithMostHateOnList(this, nullptr, true);
auto most_hate = hate_list.GetMobWithMostHateOnList(this, nullptr, true);
if (most_hate) {
SetTarget(most_hate);
}