Removed cRoot:m_PrimaryServerVersion from Lua API.
We have the accessor methods for it.
This commit is contained in:
parent
34de5210d6
commit
d3db97301b
@ -1,6 +1,6 @@
|
||||
/*
|
||||
** Lua binding: AllToLua
|
||||
** Generated automatically by tolua++-1.0.92 on 10/21/13 13:17:19.
|
||||
** Generated automatically by tolua++-1.0.92 on 10/23/13 11:04:39.
|
||||
*/
|
||||
|
||||
#ifndef __cplusplus
|
||||
@ -19403,36 +19403,6 @@ static int tolua_AllToLua_cWebPlugin_SafeString00(lua_State* tolua_S)
|
||||
}
|
||||
#endif //#ifndef TOLUA_DISABLE
|
||||
|
||||
/* get function: m_PrimaryServerVersion of class cRoot */
|
||||
#ifndef TOLUA_DISABLE_tolua_get_cRoot_m_PrimaryServerVersion
|
||||
static int tolua_get_cRoot_m_PrimaryServerVersion(lua_State* tolua_S)
|
||||
{
|
||||
cRoot* self = (cRoot*) tolua_tousertype(tolua_S,1,0);
|
||||
#ifndef TOLUA_RELEASE
|
||||
if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm_PrimaryServerVersion'",NULL);
|
||||
#endif
|
||||
tolua_pushnumber(tolua_S,(lua_Number)self->m_PrimaryServerVersion);
|
||||
return 1;
|
||||
}
|
||||
#endif //#ifndef TOLUA_DISABLE
|
||||
|
||||
/* set function: m_PrimaryServerVersion of class cRoot */
|
||||
#ifndef TOLUA_DISABLE_tolua_set_cRoot_m_PrimaryServerVersion
|
||||
static int tolua_set_cRoot_m_PrimaryServerVersion(lua_State* tolua_S)
|
||||
{
|
||||
cRoot* self = (cRoot*) tolua_tousertype(tolua_S,1,0);
|
||||
#ifndef TOLUA_RELEASE
|
||||
tolua_Error tolua_err;
|
||||
if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'm_PrimaryServerVersion'",NULL);
|
||||
if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
|
||||
tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
|
||||
#endif
|
||||
self->m_PrimaryServerVersion = ((int) tolua_tonumber(tolua_S,2,0))
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
#endif //#ifndef TOLUA_DISABLE
|
||||
|
||||
/* method: Get of class cRoot */
|
||||
#ifndef TOLUA_DISABLE_tolua_AllToLua_cRoot_Get00
|
||||
static int tolua_AllToLua_cRoot_Get00(lua_State* tolua_S)
|
||||
@ -30991,7 +30961,6 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
|
||||
tolua_endmodule(tolua_S);
|
||||
tolua_cclass(tolua_S,"cRoot","cRoot","",NULL);
|
||||
tolua_beginmodule(tolua_S,"cRoot");
|
||||
tolua_variable(tolua_S,"m_PrimaryServerVersion",tolua_get_cRoot_m_PrimaryServerVersion,tolua_set_cRoot_m_PrimaryServerVersion);
|
||||
tolua_function(tolua_S,"Get",tolua_AllToLua_cRoot_Get00);
|
||||
tolua_function(tolua_S,"GetServer",tolua_AllToLua_cRoot_GetServer00);
|
||||
tolua_function(tolua_S,"GetDefaultWorld",tolua_AllToLua_cRoot_GetDefaultWorld00);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
** Lua binding: AllToLua
|
||||
** Generated automatically by tolua++-1.0.92 on 10/21/13 13:17:20.
|
||||
** Generated automatically by tolua++-1.0.92 on 10/23/13 11:04:40.
|
||||
*/
|
||||
|
||||
/* Exported function */
|
||||
|
@ -727,7 +727,7 @@ bool cProtocolRecognizer::TryRecognizeProtocol(void)
|
||||
void cProtocolRecognizer::HandleServerPing(void)
|
||||
{
|
||||
AString Reply;
|
||||
switch (cRoot::Get()->m_PrimaryServerVersion)
|
||||
switch (cRoot::Get()->GetPrimaryServerVersion())
|
||||
{
|
||||
case PROTO_VERSION_1_2_5:
|
||||
case PROTO_VERSION_1_3_2:
|
||||
@ -771,8 +771,8 @@ void cProtocolRecognizer::HandleServerPing(void)
|
||||
Printf(MaxPlayers, "%d", cRoot::Get()->GetServer()->GetMaxPlayers());
|
||||
|
||||
AString ProtocolVersionNum;
|
||||
Printf(ProtocolVersionNum, "%d", cRoot::Get()->m_PrimaryServerVersion);
|
||||
AString ProtocolVersionTxt(GetVersionTextFromInt(cRoot::Get()->m_PrimaryServerVersion));
|
||||
Printf(ProtocolVersionNum, "%d", cRoot::Get()->GetPrimaryServerVersion());
|
||||
AString ProtocolVersionTxt(GetVersionTextFromInt(cRoot::Get()->GetPrimaryServerVersion()));
|
||||
|
||||
// Cannot use Printf() because of in-string NUL bytes.
|
||||
Reply = cChatColor::Delimiter;
|
||||
|
@ -32,10 +32,7 @@ typedef cItemCallback<cWorld> cWorldListCallback;
|
||||
class cRoot // tolua_export
|
||||
{ // tolua_export
|
||||
public:
|
||||
/// The version of the protocol that is primary for the server (reported in the server list). All versions are still supported.
|
||||
int m_PrimaryServerVersion; // tolua_export
|
||||
|
||||
static cRoot* Get() { return s_Root; } // tolua_export
|
||||
static cRoot * Get() { return s_Root; } // tolua_export
|
||||
|
||||
cRoot(void);
|
||||
~cRoot();
|
||||
@ -55,7 +52,7 @@ public:
|
||||
int GetPrimaryServerVersion(void) const { return m_PrimaryServerVersion; } // tolua_export
|
||||
void SetPrimaryServerVersion(int a_Version) { m_PrimaryServerVersion = a_Version; } // tolua_export
|
||||
|
||||
cMonsterConfig * GetMonsterConfig() { return m_MonsterConfig; }
|
||||
cMonsterConfig * GetMonsterConfig(void) { return m_MonsterConfig; }
|
||||
|
||||
cGroupManager * GetGroupManager (void) { return m_GroupManager; } // tolua_export
|
||||
cCraftingRecipes * GetCraftingRecipes(void) { return m_CraftingRecipes; } // tolua_export
|
||||
@ -135,6 +132,9 @@ private:
|
||||
typedef std::map<AString, cWorld *> WorldMap;
|
||||
typedef std::vector<cCommand> cCommandQueue;
|
||||
|
||||
/// The version of the protocol that is primary for the server (reported in the server list). All versions are still supported.
|
||||
int m_PrimaryServerVersion;
|
||||
|
||||
cWorld * m_pDefaultWorld;
|
||||
WorldMap m_WorldsByName;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user