fix protocol 860 death, fix progress bar

This commit is contained in:
Eduardo Bart
2012-01-11 10:48:34 -02:00
parent 0e88b03693
commit dba03d69f6
3 changed files with 8 additions and 2 deletions

View File

@@ -66,6 +66,7 @@ void Game::processLoginError(const std::string& error)
void Game::processConnectionError(const boost::system::error_code& error)
{
// connection errors only have meaning if we still have a protocol
dump << "disconnected: connection error = " << error.message();
if(m_protocolGame) {
if(error != asio::error::eof)
g_lua.callGlobalField("Game", "onConnectionError", error.message());

View File

@@ -307,7 +307,9 @@ void ProtocolGame::parsePing(InputMessage&)
void ProtocolGame::parseDeath(InputMessage& msg)
{
#if PROTOCOL==862
msg.getU8(); // 100 is a fair death. < 100 is a unfair death.
#endif
g_game.processDeath();
}