找回密码
 registerss
搜索

洱海月 v0-07-0300 封包解析:ID 1312 GCSendIdentityShopInfo(身份商店信息下发)

[复制链接]
Waylee 发表于 2026-4-15 17:15 | 显示全部楼层 |阅读模式 | Google Chrome | Windows 10

马上注册,查看网站隐藏内容!!

您需要 登录 才可以下载或查看,没有账号?registerss

×

GCSendIdentityShopInfo 是当前客户端保留的一条身份商店信息下发包。按当前 Game.exe 现状,它会先定位目标角色对象,再把最多 50 个 uint32 条目写入该角色的数据池,随后投递一条客户端事件用于刷新身份商店界面。

包信息

项目 内容
封包 ID 1312
包名 GCSendIdentityShopInfo
方向 GC 服务端 -> 客户端
包长 变长:21 + 4 * item_count
当前 Lua 协议定义 现役 /home/ubuntu/Game2 未检出
当前 Lua 发送点 现役 /home/ubuntu/Game2 未检出
当前用途 向指定角色对象下发身份商店条目列表与刷新参数

当前 Game.exe 可直接确认:

GetPacketID()   = 1312;
GetPacketSize() = 21 + 4 * item_count;
Read()          = 5 个头字段 + item_count 个 uint32;
Write()         = 同结构写回;
Execute()       = 2;

包体结构

偏移 长度 字段 类型 含义
0x00 0x04 target_obj_id uint32 目标角色对象 ID;客户端会先用它定位目标对象
0x04 0x04 shop_context_id uint32 身份商店上下文参数;当前会原样传给客户端事件
0x08 0x01 shop_type uint8 身份商店类型标记;当前会原样传给客户端事件
0x09 0x04 shop_state_value uint32 身份商店状态值;客户端会写入角色数据池并传给事件
0x0D 0x04 reserved_u32 uint32 当前 Execute() 未直接消费
0x11 0x04 item_count uint32 条目数量;客户端最多处理 50 条
0x15 0x04 * item_count item_id_list uint32[N] 身份商店条目 ID 列表

当前实际行为

  • 客户端先用 target_obj_id 在对象池中查找目标角色。
  • 找到对象后,会把 item_id_list 逐条写入该角色的专用数据区,最大处理上限为 50。
  • shop_state_value 会同步写入目标角色的数据池单值字段;若新值与本地缓存不同,则立即更新。
  • 随后客户端会投递事件 1350,并带上:
    • shop_context_id
    • item_count
    • shop_state_value
    • shop_type
  • reserved_u32 当前在执行链中没有稳定消费点,因此仍应按保留位处理。

服务端落点

当前现役服务端未检出以下同名协议定义或发送链:

  • /home/ubuntu/Game2/services/game/packet.lua
  • /home/ubuntu/Game2/services/msgagent.lua
  • /home/ubuntu/Game2/services/scene/scenecore.lua

因此,这条包当前主要是客户端保留的身份商店界面刷新协议。

关键代码

Read() {
    read_u32(target_obj_id);
    read_u32(shop_context_id);
    read_u8(shop_type);
    read_u32(shop_state_value);
    read_u32(reserved_u32);
    read_u32(item_count);
    for (i = 0; i < item_count && i < 50; ++i)
        read_u32(item_id_list[i]);
    return 1;
}

GetPacketSize() {
    return 21 + 4 * item_count;
}

Execute() {
    obj = find_obj(target_obj_id);
    if (obj) {
        write_identity_shop_items(obj, item_id_list, item_count);
        set_identity_shop_state(obj, shop_state_value);
        fire_event(1350, shop_context_id, item_count, shop_state_value, shop_type);
    }
    return 2;
}

结论

GCSendIdentityShopInfo(1312) 的当前结论是:

  1. 它是一条“目标对象 + 身份商店头参数 + 最多 50 个条目 ID”的列表包。
  2. target_obj_id、item_count、item_id_list 的语义已可直接确认。
  3. shop_context_id、shop_type、shop_state_value 都会进入客户端事件分发,但现役 Lua 缺位,本文对其业务名保持保守。
您需要登录后才可以回帖 登录 | registerss

本版积分规则

QQ|手机版|雪舞知识库 ( 浙ICP备15015590号-1 | 萌ICP备20232229号|浙公网安备33048102000118号 )

GMT+8, 2026-10-24 13:01 , Processed in 0.033492 second(s), 27 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表