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:
Kinglykrab
2019-06-13 18:17:37 -04:00
parent 86ed2c1e76
commit 7d1362732d
5 changed files with 86 additions and 0 deletions
+12
View File
@@ -322,6 +322,16 @@ bool Lua_Mob::FindBuff(int spell_id) {
return self->FindBuff(spell_id);
}
uint16 Lua_Mob::FindBuffBySlot(int slot) {
Lua_Safe_Call_Int();
return self->FindBuffBySlot(slot);
}
uint32 Lua_Mob::BuffCount() {
Lua_Safe_Call_Int();
return self->BuffCount();
}
bool Lua_Mob::FindType(int type) {
Lua_Safe_Call_Bool();
return self->FindType(type);
@@ -2218,6 +2228,8 @@ luabind::scope lua_register_mob() {
.def("IsInvisible", (bool(Lua_Mob::*)(Lua_Mob))&Lua_Mob::IsInvisible)
.def("SetInvisible", &Lua_Mob::SetInvisible)
.def("FindBuff", &Lua_Mob::FindBuff)
.def("FindBuffBySlot", (uint16(Lua_Mob::*)(int))&Lua_Mob::FindBuffBySlot)
.def("BuffCount", &Lua_Mob::BuffCount)
.def("FindType", (bool(Lua_Mob::*)(int))&Lua_Mob::FindType)
.def("FindType", (bool(Lua_Mob::*)(int,bool))&Lua_Mob::FindType)
.def("FindType", (bool(Lua_Mob::*)(int,bool,int))&Lua_Mob::FindType)