mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 11:28:25 +00:00
[Quest API] Add Entity Variable Methods to Perl/Lua. (#2609)
* [Quest API] Add Entity Variable Methods to Perl/Lua. # Perl - Add `$mob->ClearEntityVariables()`. - Add `$mob->DeleteEntityVariable(variable_name)`. - Add `$object->ClearEntityVariables()`. - Add `$object->DeleteEntityVariable(variable_name)`. # Lua - Add `mob:ClearEntityVariables()`. - Add `mob:DeleteEntityVariable(variable_name)`. - Add `object:ClearEntityVariables()`. - Add `object:DeleteEntityVariable(variable_name)`. # Notes - Allows operators to clear all entity variables or delete one by name, previously you just had to set to an empty value to clear after being set. * Cleanup.
This commit is contained in:
@@ -2699,6 +2699,16 @@ luabind::object Lua_Mob::GetEntityVariables(lua_State* L) {
|
||||
return t;
|
||||
}
|
||||
|
||||
bool Lua_Mob::ClearEntityVariables() {
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->ClearEntityVariables();
|
||||
}
|
||||
|
||||
bool Lua_Mob::DeleteEntityVariable(std::string variable_name) {
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->DeleteEntityVariable(variable_name);
|
||||
}
|
||||
|
||||
void Lua_Mob::SetEntityVariable(std::string variable_name, std::string variable_value) {
|
||||
Lua_Safe_Call_Void();
|
||||
self->SetEntityVariable(variable_name, variable_value);
|
||||
@@ -2855,6 +2865,7 @@ luabind::scope lua_register_mob() {
|
||||
.def("CheckLoSToLoc", (bool(Lua_Mob::*)(double,double,double))&Lua_Mob::CheckLoSToLoc)
|
||||
.def("CheckLoSToLoc", (bool(Lua_Mob::*)(double,double,double,double))&Lua_Mob::CheckLoSToLoc)
|
||||
.def("CheckNumHitsRemaining", &Lua_Mob::CheckNumHitsRemaining)
|
||||
.def("ClearEntityVariables", (bool(Lua_Mob::*)(void))&Lua_Mob::ClearEntityVariables)
|
||||
.def("ClearSpecialAbilities", (void(Lua_Mob::*)(void))&Lua_Mob::ClearSpecialAbilities)
|
||||
.def("CloneAppearance", (void(Lua_Mob::*)(Lua_Mob))&Lua_Mob::CloneAppearance)
|
||||
.def("CloneAppearance", (void(Lua_Mob::*)(Lua_Mob,bool))&Lua_Mob::CloneAppearance)
|
||||
@@ -2901,6 +2912,7 @@ luabind::scope lua_register_mob() {
|
||||
.def("DamageHateListPercentage", (void(Lua_Mob::*)(int64,uint32))&Lua_Mob::DamageHateListPercentage)
|
||||
.def("DelGlobal", (void(Lua_Mob::*)(const char*))&Lua_Mob::DelGlobal)
|
||||
.def("DeleteBucket", (void(Lua_Mob::*)(std::string))&Lua_Mob::DeleteBucket)
|
||||
.def("DeleteEntityVariable", (bool(Lua_Mob::*)(std::string))&Lua_Mob::DeleteEntityVariable)
|
||||
.def("Depop", (void(Lua_Mob::*)(bool))&Lua_Mob::Depop)
|
||||
.def("Depop", (void(Lua_Mob::*)(void))&Lua_Mob::Depop)
|
||||
.def("DivineAura", (bool(Lua_Mob::*)(void))&Lua_Mob::DivineAura)
|
||||
|
||||
Reference in New Issue
Block a user