diff --git a/modules/client_entergame/characterlist.lua b/modules/client_entergame/characterlist.lua index 33cf728c..ffbeb9bf 100644 --- a/modules/client_entergame/characterlist.lua +++ b/modules/client_entergame/characterlist.lua @@ -13,22 +13,19 @@ local resendWaitEvent local function tryLogin(charInfo, tries) tries = tries or 1 - if tries > 4 then - CharacterList.destroyLoadBox() - displayErrorBox(tr('Error'), tr('Unable to logout.')) + if tries > 50 then return end if g_game.isOnline() then if tries == 1 then g_game.safeLogout() - loadBox = displayCancelBox(tr('Please wait'), tr('Logging out...')) end - scheduleEvent(function() tryLogin(charInfo, tries+1) end, 250) + scheduleEvent(function() tryLogin(charInfo, tries+1) end, 100) return end - CharacterList.destroyLoadBox() + CharacterList.hide() local locale = modules.client_locales.getCurrentLocale().name g_game.loginWorld(G.account, G.password, charInfo.worldName, charInfo.worldHost, charInfo.worldPort, charInfo.characterName, locale) diff --git a/modules/game_interface/gameinterface.lua b/modules/game_interface/gameinterface.lua index 12538f80..1d6a6d12 100644 --- a/modules/game_interface/gameinterface.lua +++ b/modules/game_interface/gameinterface.lua @@ -127,6 +127,7 @@ end function onGameEnd() logoutButton:setTooltip(tr('Exit')) + setupViewMode(0) hide() end