Fix sending os type, bind some functions
This commit is contained in:
parent
f5c97c8e8b
commit
5f1e58c138
|
@ -229,7 +229,7 @@ public:
|
||||||
// dynamic support for game features
|
// dynamic support for game features
|
||||||
void enableFeature(Otc::GameFeature feature) { m_features.set(feature, true); }
|
void enableFeature(Otc::GameFeature feature) { m_features.set(feature, true); }
|
||||||
void disableFeature(Otc::GameFeature feature) { m_features.set(feature, false); }
|
void disableFeature(Otc::GameFeature feature) { m_features.set(feature, false); }
|
||||||
void setFeature(Otc::GameFeature feature) { m_features.set(feature, false); }
|
void setFeature(Otc::GameFeature feature, bool enabled) { m_features.set(feature, enabled); }
|
||||||
bool getFeature(Otc::GameFeature feature) { return m_features.test(feature); }
|
bool getFeature(Otc::GameFeature feature) { return m_features.test(feature); }
|
||||||
|
|
||||||
void setClientVersion(int version);
|
void setClientVersion(int version);
|
||||||
|
|
|
@ -200,6 +200,8 @@ void OTClient::registerLuaFunctions()
|
||||||
g_lua.bindSingletonFunction("g_game", "getWorldName", &Game::getWorldName, &g_game);
|
g_lua.bindSingletonFunction("g_game", "getWorldName", &Game::getWorldName, &g_game);
|
||||||
g_lua.bindSingletonFunction("g_game", "getGMActions", &Game::getGMActions, &g_game);
|
g_lua.bindSingletonFunction("g_game", "getGMActions", &Game::getGMActions, &g_game);
|
||||||
g_lua.bindSingletonFunction("g_game", "getFeature", &Game::getFeature, &g_game);
|
g_lua.bindSingletonFunction("g_game", "getFeature", &Game::getFeature, &g_game);
|
||||||
|
g_lua.bindSingletonFunction("g_game", "setFeature", &Game::setFeature, &g_game);
|
||||||
|
g_lua.bindSingletonFunction("g_game", "enableFeature", &Game::enableFeature, &g_game);
|
||||||
|
|
||||||
g_lua.registerSingletonClass("g_shaders");
|
g_lua.registerSingletonClass("g_shaders");
|
||||||
g_lua.bindSingletonFunction("g_shaders", "createShader", &ShaderManager::createShader, &g_shaders);
|
g_lua.bindSingletonFunction("g_shaders", "createShader", &ShaderManager::createShader, &g_shaders);
|
||||||
|
|
|
@ -50,7 +50,7 @@ void ProtocolGame::sendLoginPacket(uint challangeTimestamp, uint8 challangeRando
|
||||||
|
|
||||||
msg->addU8(Proto::ClientEnterGame);
|
msg->addU8(Proto::ClientEnterGame);
|
||||||
|
|
||||||
msg->addU16(g_lua.callGlobalField<int>("g_game", "getOs"));
|
msg->addU16(g_lua.callGlobalField<int>("g_game", "getOsType"));
|
||||||
msg->addU16(g_game.getClientVersion());
|
msg->addU16(g_game.getClientVersion());
|
||||||
|
|
||||||
int paddingBytes = 128;
|
int paddingBytes = 128;
|
||||||
|
|
Loading…
Reference in New Issue