mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 03:24:55 +02:00
just fixes
* clean map when relogging * fix otclientrc.lua reloading * fix game disconnection messagebox * fix animated texture
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
Client = {}
|
||||
|
||||
function Client.reloadScripts()
|
||||
dofile 'otclientrc.lua'
|
||||
dofile '/otclientrc'
|
||||
reloadModules()
|
||||
TextMessage.displayEventAdvance('All modules and scripts were reloaded.')
|
||||
print('All modules and scripts were reloaded.')
|
||||
|
@@ -4,6 +4,7 @@ CharacterList = { }
|
||||
local charactersWindow
|
||||
local loadBox
|
||||
local characterList
|
||||
local errorBox
|
||||
|
||||
-- private functions
|
||||
local function onCharactersWindowKeyPress(self, keyCode, keyboardModifiers)
|
||||
@@ -54,14 +55,20 @@ end
|
||||
|
||||
function onGameLoginError(message)
|
||||
CharacterList.destroyLoadBox()
|
||||
local errorBox = displayErrorBox("Login Error", "Login error: " .. message)
|
||||
errorBox.onOk = CharacterList.showAgain
|
||||
errorBox = displayErrorBox("Login Error", "Login error: " .. message)
|
||||
errorBox.onOk = function()
|
||||
errorBox = nil
|
||||
CharacterList.showAgain()
|
||||
end
|
||||
end
|
||||
|
||||
function onGameConnectionError(message)
|
||||
CharacterList.destroyLoadBox()
|
||||
local errorBox = displayErrorBox("Login Error", "Connection error: " .. message)
|
||||
errorBox.onOk = CharacterList.showAgain
|
||||
errorBox = displayErrorBox("Login Error", "Connection error: " .. message)
|
||||
errorBox.onOk = function()
|
||||
errorBox = nil
|
||||
CharacterList.showAgain()
|
||||
end
|
||||
end
|
||||
|
||||
-- public functions
|
||||
@@ -137,7 +144,7 @@ function CharacterList.destroy()
|
||||
end
|
||||
|
||||
function CharacterList.show()
|
||||
if not loadBox then
|
||||
if not loadBox and not errorBox then
|
||||
charactersWindow:show()
|
||||
charactersWindow:raise()
|
||||
charactersWindow:focus()
|
||||
|
Reference in New Issue
Block a user