Some particle stuff, far from done

This commit is contained in:
Henrique Santiago
2012-07-06 02:00:49 -03:00
parent 2b621cace6
commit 6a85c31a77
25 changed files with 645 additions and 39 deletions

View File

@@ -13,7 +13,7 @@ local localeComboBox
local function sendLocale(localeName)
local protocolGame = g_game.getProtocolGame()
if protocolGame then
protocolGame:sendExtendedOpcode(1, localeName)
protocolGame:sendExtendedOpcode(ExtendedLocales, localeName)
return true
end
return false
@@ -32,7 +32,7 @@ local function onGameStart()
sendLocale(currentLocale.name)
end
local function onServerSetLocale(protocol, opcode, buffer)
local function onExtendedLocales(protocol, opcode, buffer)
local locale = installedLocales[buffer]
if locale then
localeComboBox:setCurrentOption(locale.languageName)
@@ -63,7 +63,7 @@ function Locales.init()
localeComboBox.onOptionChange = onLocaleComboBoxOptionChange
end, false)
Extended.register(1, onServerSetLocale)
Extended.register(ExtendedLocales, onExtendedLocales)
connect(g_game, { onGameStart = onGameStart })
end
@@ -71,7 +71,7 @@ function Locales.terminate()
installedLocales = nil
currentLocale = nil
localeComboBox = nil
Extended.unregister(1)
Extended.unregister(ExtendedLocales)
disconnect(g_game, { onGameStart = onGameStart })
end