mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-18 12:28:26 +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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user