[Quest API] Add Caster ID Parameter to FindBuff in Perl/Lua (#3590)

* [Quest API] Add Caster ID Parameter to FindBuff in Perl/Lua

# Perl
- Add `$mob->FindBuff(spell_id, caster_id)`.

# Lua
- Add `mob:FindBuff(spell_id, caster_id)`.

# Notes
- Allows operators to check if the spell ID is cast by a specific entity ID.
- We don't use `Mob*` reference here since the mob may have died, left zone, etc.

* Formatting.
This commit is contained in:
Alex King
2023-09-29 19:38:36 -04:00
committed by GitHub
parent 79918ebaba
commit cf27f2bc88
5 changed files with 26 additions and 9 deletions
+1 -1
View File
@@ -466,7 +466,7 @@ public:
void DamageShield(Mob* other, bool spell_ds = false);
int32 RuneAbsorb(int64 damage, uint16 type);
std::vector<uint16> GetBuffSpellIDs();
bool FindBuff(uint16 spell_id);
bool FindBuff(uint16 spell_id, uint16 caster_id = 0);
uint16 FindBuffBySlot(int slot);
uint32 BuffCount(bool is_beneficial = true, bool is_detrimental = true);
bool FindType(uint16 type, bool bOffensive = false, uint16 threshold = 100);