WGCXBWTeamList 是当前客户端用于同步华山论剑战队列表的一条整表下发包。按当前 Game.exe 的 Read / Write 结果,它固定长度为 4032 字节,由 32 字节包头和 10 个 400 字节战队条目组成。客户端只在 list_type == 1 时处理这条消息:先清空本地缓存,再写入最多 10 支战队,最后触发战队列表界面刷新事件。
当前 Lua 服务端 Game2 没有定义或处理这条协议,现役落点在客户端 HuaShanLunJian_CreatTeamList 与 NewXBW 相关界面链路。
包信息
| 项目 |
内容 |
| 封包 ID |
1279 |
| 包名 |
WGCXBWTeamList |
| 方向 |
服务端 -> 客户端 |
| 固定包长 |
4032 |
| 对应功能 |
华山论剑战队列表同步 |
| 对应界面事件 |
XBW_TEAMINFOLIST_SHOW |
当前 Game.exe 可直接确认:
PacketID = 1279;
PacketSize = 4032;
包体结构
主包头
| 偏移 |
长度 |
字段 |
类型 |
含义 |
0x00 |
0x04 |
list_type |
uint32 |
列表同步类型;当前客户端仅在值为 1 时处理 |
0x04 |
0x04 |
reserved_1 |
uint32 |
当前 Execute 未直接使用 |
0x08 |
0x04 |
page_team_count |
uint32 |
当前页战队数量 |
0x0C |
0x04 |
team_total_count |
uint32 |
战队总数量 |
0x10 |
0x04 |
current_page |
uint32 |
当前页码,客户端按 0 基显示后再 +1 |
0x14 |
0x04 |
target_server_id |
uint32 |
当前战队列表所属目标服 / NPC 服务器 ID |
0x18 |
0x04 |
reserved_2 |
uint32 |
当前 Execute 未直接使用 |
0x1C |
0x04 |
reserved_3 |
uint32 |
当前 Execute 未直接使用 |
0x20 |
0x190 * 10 |
team_list[10] |
bytes[4000] |
最多 10 条战队记录,每条固定 400 字节 |
team_list[i] 战队条目结构
单条战队记录长度固定为 0x190,由 0x34 字节战队信息和 6 个成员槽组成。
| 偏移 |
长度 |
字段 |
类型 |
含义 |
0x00 |
0x04 |
team_id |
uint32 |
战队 ID |
0x04 |
0x04 |
member_count |
uint32 |
当前成员数量 |
0x08 |
0x04 |
world_id |
uint32 |
战队所在区服 / 世界 ID |
0x0C |
0x04 |
reserved_1 |
uint32 |
当前列表界面未直接使用 |
0x10 |
0x02 |
reserved_2 |
uint16 |
当前列表界面未直接使用 |
0x12 |
0x02 |
reserved_3 |
uint16 |
当前列表界面未直接使用 |
0x14 |
0x04 |
reserved_4 |
uint32 |
当前列表界面未直接使用 |
0x18 |
0x04 |
reserved_5 |
uint32 |
当前列表界面未直接使用 |
0x1C |
0x18 |
team_name |
char[24] |
战队名称 |
0x34 |
0x3A * 6 |
member_list[6] |
bytes[348] |
固定 6 个成员槽,空槽仍占位 |
member_list[j] 成员槽结构
| 偏移 |
长度 |
字段 |
类型 |
含义 |
0x00 |
0x04 |
guid |
uint32 |
成员 GUID;无效槽通常不大于 0 |
0x04 |
0x04 |
level |
uint32 |
等级 |
0x08 |
0x04 |
menpai |
uint32 |
门派 ID |
0x0C |
0x02 |
team_post |
uint16 |
队内职位;当前脚本用它区分队长 / 副队长 / 成员 |
0x0E |
0x02 |
reserved_1 |
uint16 |
当前界面未直接使用 |
0x10 |
0x02 |
duanwei_1 |
uint16 |
段位主级别 |
0x12 |
0x02 |
duanwei_2 |
uint16 |
段位子级别 |
0x14 |
0x04 |
duanwei_3 |
uint32 |
高段位附加星阶 / 附加值 |
0x18 |
0x01 |
reserved_2 |
uint8 |
当前界面未直接使用 |
0x19 |
0x01 |
reserved_3 |
uint8 |
当前界面未直接使用 |
0x1A |
0x01 |
reserved_4 |
uint8 |
当前界面未直接使用 |
0x1B |
0x01 |
reserved_5 |
uint8 |
当前界面未直接使用 |
0x1C |
0x1E |
member_name |
char[30] |
成员名字 |
当前实际行为
- 当前
Game.exe 的 Execute 只在 list_type == 1 时继续处理,其他值在现有客户端链路里不会刷新战队列表。
- 客户端处理时会先清空本地华山论剑战队列表缓存,再按顺序写入
10 个战队槽位。
- 同步完成后,客户端抛出事件
1315,传递:
arg0 = target_server_id
arg1 = page_team_count
arg2 = team_total_count
arg3 = current_page
- 当前界面脚本
HuaShanLunJian_CreatTeamList 收到该事件后,会把它解释为:
- 目标服务器 ID
- 当前列表数量
- 战队总数
- 当前页码
- 页码在脚本里按
0 基处理;翻页请求会继续调用 NewXBW:AskTeamListInfo(target_server_id, page)。
- 战队列表界面真正展示的列为:
team_id
team_name
- 队长名
member_count
- 按当前包体结构,顶层没有独立的队长名字串;
GetTeamListInfo(i) 返回的队长名更接近于客户端基于 member_list[6] 与 team_post 整理出的结果。
服务端落点
当前 Lua 服务端没有接入这条协议,以下位置均未出现 WGCXBWTeamList:
/home/ubuntu/Game2/services/game/packet.lua
/home/ubuntu/Game2/services/msgagent.lua
当前客户端实际消费落点为:
HuaShanLunJian_CreatTeamList:
- 注册事件
XBW_TEAMINFOLIST_SHOW
- 通过
NewXBW:GetTeamListInfo(i) 读取战队列表
HuaShanLunJian_TeamInfo:
- 通过
NewXBW:GetViewTeamMemberInfo(teamidx, index) 读取成员信息
这说明它属于客户端现役华山论剑 UI 链路,而不是当前 Lua Game2 的协议实现链。
关键代码
当前 Game.exe 的主包读写
Read(stream) {
read(list_type, 4);
read(reserved_1, 4);
read(page_team_count, 4);
read(team_total_count, 4);
read(current_page, 4);
read(target_server_id, 4);
read(reserved_2, 4);
read(reserved_3, 4);
for (int i = 0; i < 10; ++i) {
read(team_list[i], 400);
}
}
Write(stream) {
write(list_type, 4);
write(reserved_1, 4);
write(page_team_count, 4);
write(team_total_count, 4);
write(current_page, 4);
write(target_server_id, 4);
write(reserved_2, 4);
write(reserved_3, 4);
for (int i = 0; i < 10; ++i) {
write(team_list[i], 400);
}
}
当前 Game.exe 的执行行为
Execute(packet) {
if (!packet || packet.list_type != 1) {
return 2;
}
ClearXbwTeamList();
for (int i = 0; i < 10; ++i) {
CopyXbwTeamListEntry(i, &packet.team_list[i]);
}
PushEvent(1315,
packet.target_server_id,
packet.page_team_count,
packet.team_total_count,
packet.current_page);
return 2;
}
当前客户端脚本的列表界面入口
this:RegisterEvent("XBW_TEAMINFOLIST_SHOW")
if event == "XBW_TEAMINFOLIST_SHOW" then
local targetId = tonumber(arg0)
local teamCount = tonumber(arg1)
local teamMaxCount = tonumber(arg2)
local startPage = tonumber(arg3)
HuaShanLunJian_CreatTeamList_OnShow(targetId, teamCount, teamMaxCount, startPage)
end
local teamid, memcnt, worldId, teamname, teamleadername = NewXBW:GetTeamListInfo(i)
local level, menpai, post, duanwei1, duanwei2, dunawei3, name = NewXBW:GetViewTeamMemberInfo(teamidx, index-1)
结论
WGCXBWTeamList 的封包 ID 是 1279,固定长度 4032 字节。
- 它是华山论剑战队列表的整表同步包,固定包含
10 条战队槽,每条战队又固定包含 6 个成员槽。
- 当前客户端只在
list_type == 1 时处理这条包,并在同步完成后触发 XBW_TEAMINFOLIST_SHOW 对应的列表界面刷新。
- 当前能直接确认的关键字段包括:
page_team_count、team_total_count、current_page、target_server_id、team_id、member_count、world_id、team_name、guid、level、menpai、team_post、duanwei_1/2/3、member_name。
- 包头剩余
3 个整型字段,以及战队条目中的部分补充数值,当前 Game.exe 读写保留但现役界面未消费,暂按 reserved_x 记录,不直接扩展为未证实结论。