mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 15:58:36 +00:00
[Quest API] Add GetBuffSpellIDs() to Perl/Lua (#3273)
# Perl - Add `$mob->GetBuffSpellIDs()`. # Lua - Add `$mob->GetBuffSpellIDs()`. # Notes - These methods allow operators to get a list of a mob's buff IDs without having to loop through their buffs themselves.
This commit is contained in:
@@ -4375,6 +4375,20 @@ void Corpse::CastRezz(uint16 spellid, Mob* Caster)
|
||||
safe_delete(outapp);
|
||||
}
|
||||
|
||||
std::vector<uint16> Mob::GetBuffSpellIDs()
|
||||
{
|
||||
std::vector<uint16> l;
|
||||
|
||||
for (int i = 0; i < GetMaxTotalSlots(); i++) {
|
||||
const auto& e = buffs[i].spellid;
|
||||
if (IsValidSpell(e)) {
|
||||
l.emplace_back(e);
|
||||
}
|
||||
}
|
||||
|
||||
return l;
|
||||
}
|
||||
|
||||
bool Mob::FindBuff(uint16 spell_id)
|
||||
{
|
||||
uint32 buff_count = GetMaxTotalSlots();
|
||||
|
||||
Reference in New Issue
Block a user