2025-10-23 01:02:19 +08:00
|
|
|
|
package item
|
|
|
|
|
|
|
2025-11-19 16:11:02 +08:00
|
|
|
|
import "blazing/logic/service/common"
|
2025-10-23 01:02:19 +08:00
|
|
|
|
|
|
|
|
|
|
type BuyInboundInfo struct {
|
2025-11-24 11:56:20 +08:00
|
|
|
|
Head common.TomeeHeader `cmd:"2601" struc:"skip"`
|
2025-10-23 01:02:19 +08:00
|
|
|
|
//物品ID
|
|
|
|
|
|
ItemId uint32
|
|
|
|
|
|
//物品数量
|
|
|
|
|
|
Count uint32
|
|
|
|
|
|
}
|
|
|
|
|
|
type BuyOutboundInfo struct {
|
|
|
|
|
|
//剩余的数量
|
|
|
|
|
|
Coins uint32
|
|
|
|
|
|
//购买的物品ID
|
|
|
|
|
|
ItemId uint32
|
|
|
|
|
|
//购买数量
|
|
|
|
|
|
Count uint32
|
|
|
|
|
|
//购买的物品等级
|
|
|
|
|
|
Level uint32
|
|
|
|
|
|
}
|
2025-10-25 15:06:05 +08:00
|
|
|
|
type BuyMultiInboundInfo struct {
|
2025-11-24 11:56:20 +08:00
|
|
|
|
Head common.TomeeHeader `cmd:"2606" struc:"skip"`
|
2025-10-25 15:06:05 +08:00
|
|
|
|
ItemListLen uint32 `struc:"sizeof=ItemIds"`
|
|
|
|
|
|
ItemIds []uint32 `json:"itemIds" description:"购买的物品ID列表"` // @UInt Long对应uint64,List对应切片
|
|
|
|
|
|
}
|
|
|
|
|
|
type BuyMultiOutboundInfo struct {
|
|
|
|
|
|
//剩余的数量
|
|
|
|
|
|
Coins uint32
|
|
|
|
|
|
}
|
2025-11-25 12:29:50 +08:00
|
|
|
|
|
|
|
|
|
|
// C2S_GOLD_BUY_PRODUCT 客户端→服务端:金豆购买商品请求
|
|
|
|
|
|
type C2S_GOLD_BUY_PRODUCT struct {
|
|
|
|
|
|
Head common.TomeeHeader `cmd:"1104" struc:"skip"`
|
2026-01-10 03:14:23 +08:00
|
|
|
|
Type uint32 `json:"type"` //购买类型,0是豆子购买,1是金豆购买
|
2025-11-25 12:29:50 +08:00
|
|
|
|
ProductID uint32 `json:"product_id"` // 金豆物品id对应的产品id
|
2026-01-10 03:14:23 +08:00
|
|
|
|
Count uint32 `json:"count"` // 购买数量(前端限制金豆物品只能1个1个买)
|
2025-11-25 12:29:50 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// S2C_GoldBuyProductInfo 服务端→客户端:金豆购买商品结果返回
|
|
|
|
|
|
type S2C_GoldBuyProductInfo struct {
|
|
|
|
|
|
Reserved uint32 `json:"reserved"` // 0 空数据(预留字段)
|
2026-01-10 03:14:23 +08:00
|
|
|
|
Coins uint32 `json:"pay_gold"` // 购买物品消耗的金豆数(后端返回值需*100)
|
2025-11-25 12:29:50 +08:00
|
|
|
|
Gold uint32 `json:"gold"` // 购买后剩余金豆数(后端返回值需*100)
|
|
|
|
|
|
}
|