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

洱海月 v0-07-0300 封包解析:ID 392 GCPlayerShopSaleShopInfo(玩家商店收购店信息)

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

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

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

×

GCPlayerShopSaleShopInfo 是玩家商店收购店界面的整表数据包,会把店铺基础信息、20 个收购槽位和说明文本一次性发给客户端。

包信息

项目 内容
封包 ID 392
包名 GCPlayerShopSaleShopInfo
方向 Server -> Client
对应请求 CGPlayerShopSaleShopOpt 等收购店管理链
包长 变长;483 + desc_len
作用 刷新整张收购店界面数据

包体结构

偏移 长度 字段 类型 含义
0x00 0x0C shop_id PlayerShopGUID 目标店铺 GUID
0x0C 0x04 shop_index int32 店铺索引
0x10 0x01 context_id_minus_1 uint8 界面上下文值
0x11 0x04 reserved_1 int32 当前 Lua 固定写 0
0x15 0x04 profit_money int32 当前盈利金
0x19 0x0C shop_name char[12] 店铺名称
0x25 0x1E owner_name char[30] 店主名字
0x43 0x04 owner_guid int32 店主 GUID
0x47 0x04 slot_count int32 收购槽位数量,当前一般为 20
0x4B 0x190 slots[20] struct[20] 每条 20 字节,含物品索引、价格、需求量、显示键、暗化和待取回数量
0x1DB 0x04 desc_len uint32 说明文本长度
0x1DF desc_len char[n] string 收购说明文本
末尾 0x04 npc_server_id int32 当前交互 NPC ID

当前实际行为

  • 当前 scenecore.lua 在需要刷新收购店界面时,会统一调用 send_player_shop_sale_shop_info() 发送这条包。
  • 20 个槽位每条都包含 item_index / price / need_to_recycle / display_flag / gloom / need_to_get 六类信息。
  • 这条包是收购店界面的整表刷新包,很多操作成功后都会补发它。

服务端落点

  • 协议定义:/home/ubuntu/Game2/services/game/packet.lua
  • 发送点:/home/ubuntu/Game2/services/scene/scenecore.lua
  • 关联请求文档:/home/ubuntu/Game2/docs/07_登录_网络_封包/packet.CGPlayerShopSaleShopOpt.md

关键代码

local msg = packet_def.GCPlayerShopSaleShopInfo.new()
msg.shop_id = shop:get_guid()
msg.shop_index = playershopmanager:get_id_by_guid(shop:get_guid()) or 0
msg.context_minus_1 = math.floor(tonumber(context_minus_1) or 0)
msg.unknow_1 = 0
msg.profit_money = shop:get_profit_money()
msg.shop_name = shop:get_name()
msg.desc = shop:get_recycle_desc()
msg.owner_guid = shop:get_owner_guid()
msg.owner_name = shop:get_owner_name()
msg.slot_count = shop.RECYCLE_ITEM_COUNT
msg.slots = build_player_shop_sale_shop_slots(shop)
msg.npc_server_id = npc_server_id
scene:send2client(obj_me, msg)

结论

  1. GCPlayerShopSaleShopInfo(392) 是玩家商店收购店的整表刷新包。
  2. 结构重点是店铺头信息、20 个固定槽位和尾部说明文本。
  3. 写这条包时,应把它理解成“整张收购店界面的完整快照”。
您需要登录后才可以回帖 登录 | registerss

本版积分规则

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

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

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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