Add extended opcode patch for tfs under tools/

This commit is contained in:
Eduardo Bart
2012-08-29 16:29:18 -03:00
parent 91237e82d5
commit 79102f2275
4 changed files with 401 additions and 4 deletions

View File

@@ -131,13 +131,14 @@ void Game::processGameStart()
disableBotCall();
if(g_game.getFeature(Otc::GameClientPing)) {
m_protocolGame->sendPing();
m_pingEvent = g_dispatcher.cycleEvent([this] {
if(m_protocolGame && m_protocolGame->isConnected()) {
enableBotCall();
m_protocolGame->sendPing();
disableBotCall();
}
}, 1000);
}, 2000);
}
}

View File

@@ -222,7 +222,7 @@ private:
std::string m_accountName;
std::string m_accountPassword;
std::string m_characterName;
Timer m_pingTimer;
stdext::timer m_pingTimer;
LocalPlayerPtr m_localPlayer;
};

View File

@@ -379,7 +379,7 @@ void ProtocolGame::parsePing(const InputMessagePtr& msg)
void ProtocolGame::parsePingBack(const InputMessagePtr& msg)
{
g_game.processPingBack(m_pingTimer.ticksElapsed());
g_game.processPingBack(m_pingTimer.elapsed_millis());
}
void ProtocolGame::parseChallange(const InputMessagePtr& msg)
@@ -1379,7 +1379,7 @@ void ProtocolGame::parseExtendedOpcode(const InputMessagePtr& msg)
if(opcode == 0)
m_enableSendExtendedOpcode = true;
else
callLuaField("onExtendedOpcode", opcode, buffer);
callLuaField("onExtendedOpcode", opcode, buffer);
}
void ProtocolGame::setMapDescription(const InputMessagePtr& msg, int x, int y, int z, int width, int height)