mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 11:28:25 +00:00
Added GetGlobal() support for all Mobs.
- Uses memory (no database hits) - Allows entity-based quest global checks
This commit is contained in:
@@ -1631,6 +1631,11 @@ void Lua_Mob::TempName(const char *newname) {
|
||||
self->TempName(newname);
|
||||
}
|
||||
|
||||
std::string Lua_Mob::GetGlobal(const char *varname) {
|
||||
Lua_Safe_Call_String();
|
||||
return self->GetGlobal(varname);
|
||||
}
|
||||
|
||||
void Lua_Mob::SetGlobal(const char *varname, const char *newvalue, int options, const char *duration) {
|
||||
Lua_Safe_Call_Void();
|
||||
self->SetGlobal(varname, newvalue, options, duration);
|
||||
@@ -2120,6 +2125,7 @@ luabind::scope lua_register_mob() {
|
||||
.def("SendSpellEffect", (void(Lua_Mob::*)(uint32,uint32,uint32,bool,uint32,bool,Lua_Client))&Lua_Mob::SendSpellEffect)
|
||||
.def("TempName", (void(Lua_Mob::*)(void))&Lua_Mob::TempName)
|
||||
.def("TempName", (void(Lua_Mob::*)(const char*))&Lua_Mob::TempName)
|
||||
.def("GetGlobal", (std::string(Lua_Mob::*)(const char*))&Lua_Mob::GetGlobal)
|
||||
.def("SetGlobal", (void(Lua_Mob::*)(const char*,const char*,int,const char*))&Lua_Mob::SetGlobal)
|
||||
.def("SetGlobal", (void(Lua_Mob::*)(const char*,const char*,int,const char*,Lua_Mob))&Lua_Mob::SetGlobal)
|
||||
.def("TarGlobal", (void(Lua_Mob::*)(const char*,const char*,const char*,int,int,int))&Lua_Mob::TarGlobal)
|
||||
|
||||
Reference in New Issue
Block a user