mirror of
https://github.com/edubart/otclient.git
synced 2025-12-21 16:07:12 +01:00
ctrl+g kinda working, but login/logout events still need a remake
This commit is contained in:
@@ -775,6 +775,16 @@ void LuaInterface::getGlobal(const std::string& key)
|
||||
lua_getglobal(L, key.c_str());
|
||||
}
|
||||
|
||||
void LuaInterface::getGlobalField(const std::string& globalKey, const std::string& fieldKey)
|
||||
{
|
||||
getGlobal(globalKey);
|
||||
if(!isNil()) {
|
||||
assert(isTable() || isUserdata());
|
||||
getField(fieldKey);
|
||||
remove(-2);
|
||||
}
|
||||
}
|
||||
|
||||
void LuaInterface::setGlobal(const std::string& key)
|
||||
{
|
||||
assert(hasIndex(-1));
|
||||
|
||||
Reference in New Issue
Block a user