25 lines
1023 B
Go
25 lines
1023 B
Go
package egg
|
||
|
||
import (
|
||
"blazing/common/data"
|
||
"blazing/logic/service/common"
|
||
)
|
||
|
||
// C2S_EGG_GAME_PLAY 前端向后端发送的抽蛋请求结构体
|
||
// 对应原 C# 的 C2S_EGG_GAME_PLAY
|
||
type C2S_EGG_GAME_PLAY struct {
|
||
Head common.TomeeHeader `cmd:"3201" struc:"skip"`
|
||
EggNum int32 `struc:"uint32"` // 抽蛋次数标识:1 = 1次 2 = 5次 3 = 10次
|
||
// 注:Go 中 uint 是平台相关类型(32/64位),游戏开发中推荐用 uint32 明确匹配 C# 的 uint
|
||
}
|
||
|
||
// S2C_EGG_GAME_PLAY 后端向前端返回的抽蛋结果结构体
|
||
// 对应原 C# 的 S2C_EGG_GAME_PLAY
|
||
type S2C_EGG_GAME_PLAY struct {
|
||
GiftIN uint32 `json:"giftIN"` // 未知字段 写0 未引用
|
||
PetID uint32 `json:"petID"` // 抽中精灵的id
|
||
HadTime uint32 `json:"hadTime"` // 抽中精灵的捕捉时间(若为时间戳,建议改为 uint64)
|
||
ListInfoLen uint32 `struc:"sizeof=ListInfo"`
|
||
ListInfo []data.ItemInfo `json:"listinfo"` // 抽中物品的物品数组
|
||
}
|