Fix locale send, spelllist reload, few changes

This commit is contained in:
Henrique Santiago 2013-02-18 22:18:10 -03:00
parent 67fc77d507
commit 59a5b8115a
6 changed files with 25 additions and 12 deletions

View File

@ -146,6 +146,9 @@ function setLocale(name)
pwarning("Locale " .. name .. ' does not exist.') pwarning("Locale " .. name .. ' does not exist.')
return false return false
end end
if currentLocale then
sendLocale(locale.name)
end
currentLocale = locale currentLocale = locale
g_settings.set('locale', name) g_settings.set('locale', name)
if onLocaleChanged then onLocaleChanged(name) end if onLocaleChanged then onLocaleChanged(name) end

View File

@ -317,4 +317,5 @@ NetworkMessageTypes = {
SoundChannels = { SoundChannels = {
Music = 1, Music = 1,
Ambient = 2, Ambient = 2,
Effect = 3,
} }

View File

@ -67,7 +67,7 @@ MiniWindow
icon: /images/topbuttons/healthinfo icon: /images/topbuttons/healthinfo
id: healthInfoWindow id: healthInfoWindow
!text: tr('Health Info') !text: tr('Health Info')
height: 121 height: 126
@onClose: modules.game_healthinfo.onMiniWindowClose() @onClose: modules.game_healthinfo.onMiniWindowClose()
&save: true &save: true

View File

@ -161,6 +161,10 @@ function init()
initialiseSpelllist() initialiseSpelllist()
resizeWindow() resizeWindow()
if g_game.isOnline() then
online()
end
end end
function terminate() function terminate()

View File

@ -92,7 +92,7 @@ TextColors = {
--blue1 = '#6e50dc', --blue1 = '#6e50dc',
--blue2 = '#3264c8', --blue2 = '#3264c8',
--blue3 = '#0096c8', --blue3 = '#0096c8',
white = '#ffffff' --'#bebebe' white = '#ffffff', --'#bebebe'
} }
MessageModes = { MessageModes = {
@ -146,7 +146,7 @@ MessageModes = {
RVRAnswer = 47, RVRAnswer = 47,
RVRContinue = 48, RVRContinue = 48,
Last = 49, Last = 49,
Invalid = 255 Invalid = 255,
} }
OTSERV_RSA = "1091201329673994292788609605089955415282375029027981291234687579" .. OTSERV_RSA = "1091201329673994292788609605089955415282375029027981291234687579" ..
@ -170,7 +170,7 @@ OsTypes = {
Flash = 3, Flash = 3,
OtclientLinux = 10, OtclientLinux = 10,
OtclientWindows = 11, OtclientWindows = 11,
OtclientMac = 12 OtclientMac = 12,
} }
PathFindResults = { PathFindResults = {
@ -178,26 +178,31 @@ PathFindResults = {
Position = 1, Position = 1,
Impossible = 2, Impossible = 2,
TooFar = 3, TooFar = 3,
NoWay = 4 NoWay = 4,
} }
PathFindFlags = { PathFindFlags = {
AllowNullTiles = 1, AllowNullTiles = 1,
AllowCreatures = 2, AllowCreatures = 2,
AllowNonPathable = 4, AllowNonPathable = 4,
AllowNonWalkable = 8 AllowNonWalkable = 8,
} }
VipState = { VipState = {
Offline = 0, Offline = 0,
Online = 1, Online = 1,
Pending = 2 Pending = 2,
} }
ExtendedIds = { ExtendedIds = {
Activate = 0, Activate = 0,
Locale = 1, Locale = 1,
Ping = 2 Ping = 2,
Sound = 3,
Game = 4,
Particles = 5,
MapShader = 6,
NeedsUpdate = 7
} }
-- @} -- @}

View File

@ -25,7 +25,7 @@ function ProtocolLogin:cancelLogin()
self:disconnect() self:disconnect()
end end
function ProtocolLogin:sendLoginPacket(extended) function ProtocolLogin:sendLoginPacket()
local msg = OutputMessage.create() local msg = OutputMessage.create()
msg:addU8(ClientOpcodes.ClientEnterAccount) msg:addU8(ClientOpcodes.ClientEnterAccount)
@ -130,12 +130,12 @@ function ProtocolLogin:parseCharacterList(msg)
character.worldName = msg:getString() character.worldName = msg:getString()
character.worldIp = iptostring(msg:getU32()) character.worldIp = iptostring(msg:getU32())
character.worldPort = msg:getU16() character.worldPort = msg:getU16()
characters[i] = character
-- ??
if g_game.getProtocolVersion() >= 971 then if g_game.getProtocolVersion() >= 971 then
msg:getU8() character.unknown = msg:getU8()
end end
characters[i] = character
end end
local account = {} local account = {}