找回密码
 registerss
搜索
查看: 19|回复: 0

洱海月 v0-07-0300 封包解析:ID 1039 GCPetSoulXiShuXing(宠魂洗属性结果下发)

[复制链接]
  • 打卡等级:本地老炮
  • 打卡总天数:603
  • 打卡月天数:1
  • 打卡总奖励:600
  • 最近打卡:2026-10-03 06:32:28
Waylee 发表于 2026-4-15 16:44 | 显示全部楼层 |阅读模式 | Google Chrome | Windows 10

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

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

×

GCPetSoulXiShuXing 是宠魂洗属性功能的结果下发包。当前版本里,这条包固定携带 6 组属性类型和值,result = 1 用于下发洗练预览结果,result = 2 用于下发确认后的正式属性结果。

包信息

项目 内容
封包 ID 1039
包名 GCPetSoulXiShuXing
方向 GC 游戏服 -> 客户端
固定包长 52
当前 Lua 协议定义 /home/ubuntu/Game2/services/game/packet.lua
当前主发送点 /home/ubuntu/Game2/lualib/script_base.lua
当前用途 下发宠魂洗属性预览结果或确认结果

当前 Game.exe 可直接确认:

GetPacketID()   = 1039;
GetPacketSize() = 52;
Read()          = result + 6 * { type, value };
Write()         = result + 6 * { type, value };
Execute()       = 刷新宠魂洗属性结果界面;

包体结构

偏移 长度 字段 类型 含义
0x00 0x04 result int32 结果类型;当前现役为 1 预览、2 确认
0x04 0x04 attr_1_type int32 第 1 组属性类型
0x08 0x04 attr_1_value int32 第 1 组属性值
0x0C 0x04 attr_2_type int32 第 2 组属性类型
0x10 0x04 attr_2_value int32 第 2 组属性值
0x14 0x04 attr_3_type int32 第 3 组属性类型
0x18 0x04 attr_3_value int32 第 3 组属性值
0x1C 0x04 attr_4_type int32 第 4 组属性类型
0x20 0x04 attr_4_value int32 第 4 组属性值
0x24 0x04 attr_5_type int32 第 5 组属性类型
0x28 0x04 attr_5_value int32 第 5 组属性值
0x2C 0x04 attr_6_type int32 第 6 组属性类型
0x30 0x04 attr_6_value int32 第 6 组属性值

当前实际行为

  • 当前 Lua 在生成临时洗练结果时,会把 pet_soul_attr 写入角色临时缓存,然后发送 result = 1 的 GCPetSoulXiShuXing 给客户端做预览。
  • 玩家确认保存后,服务端会先回 GCItemInfo 更新背包内兽魂数据,再发送 result = 2 的 GCPetSoulXiShuXing 刷新最终属性结果。
  • 当前 packet.lua 的 bos 已完整按 result + 6 组属性 序列化,能够满足服务端发送使用。
  • 当前 packet.lua 的 bis 只读取了 result 并分配了 6 个空表,属于接收侧占位实现;但这条包在现役服务端是发送包,不影响实际功能。

服务端落点

  • 协议定义:/home/ubuntu/Game2/services/game/packet.lua
  • 预览结果发送:/home/ubuntu/Game2/lualib/script_base.lua
  • 确认保存发送:/home/ubuntu/Game2/lualib/script_base.lua
  • 配套请求入口:/home/ubuntu/Game2/services/msgagent.lua、/home/ubuntu/Game2/services/scene/scenecore.lua

关键代码

当前 Lua 预览结果发送

local pet_soul_attr = item:get_pet_equip_data():gen_soul_attr(LockValue, LockColorCount)
obj:set_temp_pet_soul_attr_data(BagPos, pet_soul_attr)
local msg = packet_def.GCPetSoulXiShuXing.new()
msg.result = 1
msg.shuxings = pet_soul_attr
obj:get_scene():send2client(obj, msg)

当前 Lua 确认保存发送

local msg = packet_def.GCPetSoulXiShuXing.new()
msg.result = 2
msg.shuxings = data.attr
obj:get_scene():send2client(obj, msg)

结论

  1. GCPetSoulXiShuXing 是固定 52 字节的结果下发包。
  2. 当前现役语义很明确:result = 1 表示洗练预览,result = 2 表示确认后的正式结果。
  3. 包体核心内容始终是 6 组 {属性类型, 属性值}。
  4. 当前版本的主发送链已经在 Lua 中落地,客户端收到后用于刷新宠魂洗属性界面。
您需要登录后才可以回帖 登录 | registerss

本版积分规则

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

GMT+8, 2026-10-4 11:26 , Processed in 0.061653 second(s), 26 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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