fix(net): 修复 40250 进入游戏时的收包错位

- GC_ITEM_DEL(20) 按 40250 旧结构为 42 字节,GC_REFINE_INFORMATION(95) 为 59 字节
- 公会标记连接接受 GC_MARK_DIFF_DATA(101),按 1 字节消费
- GUILD_SUBHEADER_GC_SKILL_INFO 服务器声明 22 字节但实际只写 21 字节,
  按实际长度分帧,修复 "unknown GC header 200 (last: 75,20)" 断线
- 会话测试的 quest info 包改为 40250 按 flag 定长的格式,新增对应分帧测试

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ft3kXpNdLbKEfg5uDLfqVF
This commit is contained in:
shenlei
2026-09-12 21:29:21 +09:00
co-authored by Claude Opus 5
parent 474a709f69
commit 85ce75e707
7 changed files with 239 additions and 23 deletions
@@ -59,6 +59,12 @@ static void test_mark_download() {
assert(request.size() == sizeof(CGMarkIDXList));
assert(request[0] == HDR_CG_MARK_IDXLIST);
// GuildMarkDownloader.cpp:172/201 frames HEADER_GC_MARK_DIFF_DATA (101) as a
// bare header byte and ignores it; the next mark frame must still parse.
const uint8_t diff = 101;
client.stream().feed(&diff, 1);
assert(client.stream().last_error().empty());
// One guild maps to image zero, position one. Feed the whole-size frame in
// two chunks to exercise the custom raw framing path.
std::vector<uint8_t> idx(sizeof(GCMarkIDXList) + 4);