mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
reaname and cleanup many stuff
This commit is contained in:
@@ -28,8 +28,8 @@ local function tryLogin(charInfo, tries)
|
||||
return
|
||||
end
|
||||
|
||||
if Game.isOnline() then
|
||||
Game.safeLogout()
|
||||
if g_game.isOnline() then
|
||||
g_game.safeLogout()
|
||||
if tries == 1 then
|
||||
loadBox = displayCancelBox('Please wait', 'Loggin out...')
|
||||
end
|
||||
@@ -39,12 +39,12 @@ local function tryLogin(charInfo, tries)
|
||||
|
||||
CharacterList.destroyLoadBox()
|
||||
|
||||
Game.loginWorld(EnterGame.account, EnterGame.password, charInfo.worldHost, charInfo.worldPort, charInfo.characterName)
|
||||
g_game.loginWorld(EnterGame.account, EnterGame.password, charInfo.worldHost, charInfo.worldPort, charInfo.characterName)
|
||||
|
||||
loadBox = displayCancelBox('Please wait', 'Connecting to game server...')
|
||||
connect(loadBox, { onCancel = function()
|
||||
loadBox = nil
|
||||
Game.cancelLogin()
|
||||
g_game.cancelLogin()
|
||||
CharacterList.show()
|
||||
end })
|
||||
|
||||
@@ -110,7 +110,7 @@ end
|
||||
|
||||
function CharacterList.destroy()
|
||||
CharacterList.hide()
|
||||
if not Game.isOnline() then
|
||||
if not g_game.isOnline() then
|
||||
EnterGame.show()
|
||||
end
|
||||
end
|
||||
|
@@ -110,7 +110,7 @@ function EnterGame.hide()
|
||||
end
|
||||
|
||||
function EnterGame.openWindow()
|
||||
if Game.isOnline() then
|
||||
if g_game.isOnline() then
|
||||
CharacterList.show()
|
||||
elseif not CharacterList.isVisible() then
|
||||
EnterGame.show()
|
||||
|
Reference in New Issue
Block a user