mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
New Perl/Lua buff functionality.
- Mob::FindBuffBySlot(slot) This allows you to find buffs by a specific slot. Example: https://i.imgur.com/VG68cxs.png Perl Example: https://pastebin.com/8HvMAC4h - Mob::BuffCount() This will find the active number of buffs an NPC/client has. Example: https://i.imgur.com/jrLRBwV.png Perl Example: https://pastebin.com/Wmg16wwp
This commit is contained in:
@@ -4032,6 +4032,23 @@ bool Mob::FindBuff(uint16 spellid)
|
||||
return false;
|
||||
}
|
||||
|
||||
uint16 Mob::FindBuffBySlot(int slot) {
|
||||
if (buffs[slot].spellid != SPELL_UNKNOWN)
|
||||
return buffs[slot].spellid;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32 Mob::BuffCount() {
|
||||
uint32 active_buff_count = 0;
|
||||
int buff_count = GetMaxTotalSlots();
|
||||
for (int i = 0; i < buff_count; i++)
|
||||
if (buffs[i].spellid != SPELL_UNKNOWN)
|
||||
active_buff_count++;
|
||||
|
||||
return active_buff_count;
|
||||
}
|
||||
|
||||
// removes all buffs
|
||||
void Mob::BuffFadeAll()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user