Login support for 10.21 ~ 10.22
Please someone test more it ! Not tested in real Tibia !
This commit is contained in:
parent
b3717ceb93
commit
d2473fd424
|
@ -135,6 +135,33 @@ end
|
||||||
|
|
||||||
function ProtocolLogin:parseCharacterList(msg)
|
function ProtocolLogin:parseCharacterList(msg)
|
||||||
local characters = {}
|
local characters = {}
|
||||||
|
|
||||||
|
if g_game.getProtocolVersion() > 1010 then
|
||||||
|
local worlds = {}
|
||||||
|
|
||||||
|
local worldsCount = msg:getU8()
|
||||||
|
for i=1, worldsCount do
|
||||||
|
local world = {}
|
||||||
|
local worldId = msg:getU8()
|
||||||
|
world.worldName = msg:getString()
|
||||||
|
world.worldIp = iptostring(msg:getU32())
|
||||||
|
world.worldPort = msg:getU16()
|
||||||
|
msg:getU8() -- unknow byte?
|
||||||
|
worlds[worldId] = world
|
||||||
|
end
|
||||||
|
|
||||||
|
local charactersCount = msg:getU8()
|
||||||
|
for i=1, charactersCount do
|
||||||
|
local character = {}
|
||||||
|
local worldId = msg:getU8()
|
||||||
|
character.name = msg:getString()
|
||||||
|
character.worldName = worlds[worldId].worldName
|
||||||
|
character.worldIp = worlds[worldId].worldIp
|
||||||
|
character.worldPort = worlds[worldId].worldPort
|
||||||
|
characters[i] = character
|
||||||
|
end
|
||||||
|
|
||||||
|
else
|
||||||
local charactersCount = msg:getU8()
|
local charactersCount = msg:getU8()
|
||||||
for i=1,charactersCount do
|
for i=1,charactersCount do
|
||||||
local character = {}
|
local character = {}
|
||||||
|
@ -149,6 +176,7 @@ function ProtocolLogin:parseCharacterList(msg)
|
||||||
|
|
||||||
characters[i] = character
|
characters[i] = character
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local account = {}
|
local account = {}
|
||||||
account.premDays = msg:getU16()
|
account.premDays = msg:getU16()
|
||||||
|
|
Loading…
Reference in New Issue