20 lines
715 B
Lua
20 lines
715 B
Lua
local struct_lib = require('struct')
|
|
local string = struct_lib.string
|
|
local tag = struct_lib.tag
|
|
local uint32 = struct_lib.uint32
|
|
local uint16 = struct_lib.uint16
|
|
local int16 = struct_lib.int16
|
|
local pc_name = string(0x10)
|
|
local entity_id = tag(uint32, 'entity')
|
|
local ip = tag(uint32, 'ip')
|
|
|
|
function getAccountInfo()
|
|
return struct({signature = '538B5C240856578BFB83C9FF33C053F2AEA1'}, {
|
|
version = {0x248, string(0x10)},
|
|
ip = {0x260, ip},
|
|
port = {0x26C, uint16},
|
|
id = {0x314, entity_id},
|
|
name = {0x318, pc_name},
|
|
server_id = {0x390, int16},
|
|
})
|
|
end |