mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
[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:
+8
-2
@@ -315,11 +315,16 @@ void Lua_Mob::SetInvisible(int state) {
|
||||
self->SetInvisible(state);
|
||||
}
|
||||
|
||||
bool Lua_Mob::FindBuff(int spell_id) {
|
||||
bool Lua_Mob::FindBuff(uint16 spell_id) {
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->FindBuff(spell_id);
|
||||
}
|
||||
|
||||
bool Lua_Mob::FindBuff(uint16 spell_id, uint16 caster_id) {
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->FindBuff(spell_id, caster_id);
|
||||
}
|
||||
|
||||
uint16 Lua_Mob::FindBuffBySlot(int slot) {
|
||||
Lua_Safe_Call_Int();
|
||||
return self->FindBuffBySlot(slot);
|
||||
@@ -3324,7 +3329,8 @@ luabind::scope lua_register_mob() {
|
||||
.def("Emote", &Lua_Mob::Emote)
|
||||
.def("EntityVariableExists", &Lua_Mob::EntityVariableExists)
|
||||
.def("FaceTarget", (void(Lua_Mob::*)(Lua_Mob))&Lua_Mob::FaceTarget)
|
||||
.def("FindBuff", &Lua_Mob::FindBuff)
|
||||
.def("FindBuff", (bool(Lua_Mob::*)(uint16))&Lua_Mob::FindBuff)
|
||||
.def("FindBuff", (bool(Lua_Mob::*)(uint16,uint16))&Lua_Mob::FindBuff)
|
||||
.def("FindBuffBySlot", (uint16(Lua_Mob::*)(int))&Lua_Mob::FindBuffBySlot)
|
||||
.def("FindGroundZ", (double(Lua_Mob::*)(double,double))&Lua_Mob::FindGroundZ)
|
||||
.def("FindGroundZ", (double(Lua_Mob::*)(double,double,double))&Lua_Mob::FindGroundZ)
|
||||
|
||||
Reference in New Issue
Block a user