[Quest API] Add Hatelist Count Methods to Perl/Lua (#4106)

# Perl
- Add `$mob->GetHateListCount()`.# Perl
- Add `$mob->GetHateListCount()`.
- Add `$mob->GetHateListBotCount()`.
- Add `$mob->GetHateListClientCount()`.
- Add `$mob->GetHateListNPCCount()`.

# Lua
- Add `mob:GetHateListCount()`.
- Add `mob:GetHateListBotCount()`.
- Add `mob:GetHateListClientCount()`.
- Add `mob:GetHateListNPCCount()`.

# Notes
- Allows operators to more easily get a total entity count of a Mob's hate list, can do an overall count, or specifically bots, clients, or NPCs.
This commit is contained in:
Alex King
2024-02-20 23:39:57 -05:00
committed by GitHub
parent f505c2cfd2
commit 67d8250b1c
6 changed files with 92 additions and 1 deletions
+8
View File
@@ -36,6 +36,13 @@ struct struct_HateList {
uint32 last_modified; // we need to remove this if it gets higher than 10 mins
};
enum class HateListCountType {
Bot = 0,
Client = 1,
NPC = 2,
All = 3,
};
class HateList {
public:
HateList();
@@ -51,6 +58,7 @@ public:
bool IsEntOnHateList(Mob* m);
bool IsHateListEmpty();
bool RemoveEntFromHateList(Mob *ent);
uint32 GetHateListCount(HateListCountType count_type = HateListCountType::All);
int AreaRampage(Mob *caster, Mob *target, int count, ExtraAttackOptions *opts);
int GetSummonedPetCountOnHateList();