From e8767d39711200d87c7b01c2396ebb5347fb8c27 Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Thu, 26 Jan 2012 15:23:47 -0200 Subject: [PATCH] fix possible crash when disconnecting, fix status small message --- modules/game_textmessage/textmessage.lua | 4 ++-- src/otclient/core/game.cpp | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/game_textmessage/textmessage.lua b/modules/game_textmessage/textmessage.lua index ba3f28c0..aa45bb1e 100644 --- a/modules/game_textmessage/textmessage.lua +++ b/modules/game_textmessage/textmessage.lua @@ -13,7 +13,7 @@ local MessageTypes = { eventAdvance = { color = '#FFFFFF', consoleTab = 'Server Log', labelId = 'centerAdvance', consoleOption = 'showEventMessagesInConsole', wrap = true }, eventDefault = { color = '#FFFFFF', consoleTab = 'Server Log', labelId = 'bottomStatus', consoleOption = 'showEventMessagesInConsole' }, statusDefault = { color = '#FFFFFF', consoleTab = 'Server Log', labelId = 'bottomStatus', consoleOption = 'showStatusMessagesInConsole' }, - statusSmall = { color = '#FFFFFF', windowLocation = 'bottomStatus' }, + statusSmall = { color = '#FFFFFF', labelId = 'bottomStatus' }, } local centerTextMessagePanel @@ -44,7 +44,7 @@ local function displayMessage(msgtype, msg, time) end if not time then - time = math.max(#msg * 100, 5000) + time = math.max(#msg * 100, 4000) else time = time * 1000 end diff --git a/src/otclient/core/game.cpp b/src/otclient/core/game.cpp index 3434cd47..cd08b1b7 100644 --- a/src/otclient/core/game.cpp +++ b/src/otclient/core/game.cpp @@ -257,6 +257,9 @@ void Game::walk(Otc::Direction direction) void Game::forceWalk(Otc::Direction direction) { + if(!isOnline() || !checkBotProtection()) + return; + switch(direction) { case Otc::North: m_protocolGame->sendWalkNorth();