Add GetRealmID
This commit is contained in:
@@ -51,6 +51,24 @@ namespace LuaGlobalFunctions
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns emulator .conf RealmID
|
||||
*
|
||||
* - for MaNGOS returns the realmID as it is stored in the core.
|
||||
* - for TrinityCore returns the realmID as it is in the conf file.
|
||||
* @return uint32 realm ID
|
||||
*/
|
||||
|
||||
int GetRealmID(lua_State* L)
|
||||
{
|
||||
#ifdef MANGOS
|
||||
Eluna::Push(L, eWorld->GetRealmID());
|
||||
#else
|
||||
Eluna::Push(L, sConfigMgr->GetIntDefault("RealmID", 1));
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns emulator version
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user