void lua_pushelement ( lua_State* luaVM, CClientEntity* pElement ) { if ( pElement ) { if ( pElement->IsBeingDeleted ( ) ) { lua_pushboolean ( luaVM, false ); return; } ElementID ID = pElement->GetID (); if ( ID != INVALID_ELEMENT_ID ) { const char* szClass = NULL; CLuaMain* pLuaMain = g_pClientGame->GetLuaManager ()->GetVirtualMachine ( luaVM ); if ( pLuaMain->IsOOPEnabled () ) szClass = CLuaClassDefs::GetEntityClass ( pElement ); lua_pushobject ( luaVM, szClass, ( void* ) reinterpret_cast < unsigned int * > ( ID.Value () ) ); return; } } lua_pushnil ( luaVM ); }
void lua_pushxmlnode ( lua_State* luaVM, CXMLNode* pElement ) { const char* szClass = NULL; CLuaMain* pLuaMain = g_pClientGame->GetLuaManager ()->GetVirtualMachine ( luaVM ); if ( pLuaMain->IsOOPEnabled () ) szClass = CLuaClassDefs::GetXmlNodeClass ( pElement ); lua_pushobject ( luaVM, szClass, ( void* ) reinterpret_cast < unsigned int * > ( pElement->GetID () ) ); }
void lua_pushtimer ( lua_State* luaVM, CLuaTimer* pTimer ) { const char* szClass = NULL; CLuaMain* pLuaMain = g_pClientGame->GetLuaManager ()->GetVirtualMachine ( luaVM ); if ( pLuaMain->IsOOPEnabled () ) szClass = CLuaClassDefs::GetTimerClass ( pTimer ); lua_pushobject ( luaVM, szClass, ( void* ) reinterpret_cast < unsigned int * > ( pTimer->GetScriptID () ) ); }
void lua_pushaccount ( lua_State* luaVM, CAccount* pAccount ) { const char* szClass = NULL; CLuaMain* pLuaMain = g_pGame->GetLuaManager ()->GetVirtualMachine ( luaVM ); if ( pLuaMain && pLuaMain->IsOOPEnabled () ) szClass = CLuaClassDefs::GetAccountClass ( pAccount ); lua_pushobject ( luaVM, szClass, ( void* ) reinterpret_cast < unsigned int * > ( pAccount->GetScriptID () ) ); }
void lua_pushaclgroup ( lua_State* luaVM, CAccessControlListGroup* pGroup ) { const char* szClass = NULL; CLuaMain* pLuaMain = g_pGame->GetLuaManager ()->GetVirtualMachine ( luaVM ); if ( pLuaMain && pLuaMain->IsOOPEnabled () ) szClass = CLuaClassDefs::GetACLGroupClass ( pGroup ); lua_pushobject ( luaVM, szClass, ( void* ) reinterpret_cast < unsigned int * > ( pGroup->GetScriptID () ) ); }
void lua_pushquery ( lua_State* luaVM, CDbJobData* pJobData ) { const char* szClass = NULL; CLuaMain* pLuaMain = g_pGame->GetLuaManager ()->GetVirtualMachine ( luaVM ); if ( pLuaMain && pLuaMain->IsOOPEnabled () ) szClass = CLuaClassDefs::GetQueryClass ( pJobData ); lua_pushobject ( luaVM, szClass, ( void* ) reinterpret_cast < unsigned int * > ( pJobData->GetId() ) ); }
void lua_pushtextitem ( lua_State* luaVM, CTextItem* pItem ) { const char* szClass = NULL; CLuaMain* pLuaMain = g_pGame->GetLuaManager ()->GetVirtualMachine ( luaVM ); if ( pLuaMain && pLuaMain->IsOOPEnabled () ) szClass = CLuaClassDefs::GetTextItemClass ( pItem ); lua_pushobject ( luaVM, szClass, ( void* ) reinterpret_cast < unsigned int * > ( pItem->GetScriptID () ) ); }
int CLuaFunctionDefs::IsOOPEnabled ( lua_State* luaVM ) { CLuaMain* pLuaMain = m_pLuaManager->GetVirtualMachine ( luaVM ); if ( pLuaMain ) lua_pushboolean ( luaVM, pLuaMain->IsOOPEnabled () ); else lua_pushnil ( luaVM ); return 1; }