mirror of
https://github.com/edubart/otclient.git
synced 2025-10-20 22:43:27 +02:00
Many changes
* IMPORTANT: dat/spr should now be placed in /data/things/ * Rename game_tibiafiles to game_things * Make battle list algorithm much faster * Split UITabBar into UITabBar and UIMoveableTabBar * Fix other minor issues
This commit is contained in:
@@ -5,12 +5,10 @@ local defaultLocaleName = 'en'
|
||||
local installedLocales
|
||||
local currentLocale
|
||||
|
||||
LocaleExtendedId = 1
|
||||
|
||||
function sendLocale(localeName)
|
||||
local protocolGame = g_game.getProtocolGame()
|
||||
if protocolGame then
|
||||
protocolGame:sendExtendedOpcode(LocaleExtendedId, localeName)
|
||||
protocolGame:sendExtendedOpcode(ExtendedIds.Locale, localeName)
|
||||
return true
|
||||
end
|
||||
return false
|
||||
@@ -66,7 +64,7 @@ function init()
|
||||
connect(g_app, {onRun = createWindow})
|
||||
end
|
||||
|
||||
ProtocolGame.registerExtendedOpcode(LocaleExtendedId, onExtendedLocales)
|
||||
ProtocolGame.registerExtendedOpcode(ExtendedIds.Locale, onExtendedLocales)
|
||||
connect(g_game, { onGameStart = onGameStart })
|
||||
end
|
||||
|
||||
@@ -74,7 +72,7 @@ function terminate()
|
||||
installedLocales = nil
|
||||
currentLocale = nil
|
||||
|
||||
ProtocolGame.unregisterExtendedOpcode(LocaleExtendedId)
|
||||
ProtocolGame.unregisterExtendedOpcode(ExtendedIds.Locale)
|
||||
disconnect(g_game, { onGameStart = onGameStart })
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user