mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 20:14:54 +02:00
Started 1050 implementation and fix ups:
* Dat now loads (new animations aren't yet functional). * Fixed the way we reference client versions. TODO: Write new animation functionality & find out protocol changes.
This commit is contained in:
@@ -2,11 +2,11 @@ filename = nil
|
||||
loaded = false
|
||||
|
||||
function init()
|
||||
connect(g_game, { onProtocolVersionChange = load })
|
||||
connect(g_game, { onClientVersionChange = load })
|
||||
end
|
||||
|
||||
function terminate()
|
||||
disconnect(g_game, { onProtocolVersionChange = load })
|
||||
disconnect(g_game, { onClientVersionChange = load })
|
||||
end
|
||||
|
||||
function setFileName(name)
|
||||
@@ -43,8 +43,9 @@ function load()
|
||||
local messageBox = displayErrorBox(tr('Error'), errorMessage)
|
||||
addEvent(function() messageBox:raise() messageBox:focus() end)
|
||||
|
||||
disconnect(g_game, { onProtocolVersionChange = load })
|
||||
disconnect(g_game, { onClientVersionChange = load })
|
||||
g_game.setClientVersion(0)
|
||||
g_game.setProtocolVersion(0)
|
||||
connect(g_game, { onProtocolVersionChange = load })
|
||||
connect(g_game, { onClientVersionChange = load })
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user