Files
bl/logic/controller/pet_ext.go
xinian d83cf365ac
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed
更新说明
2026-04-05 23:13:06 +08:00

39 lines
1.4 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package controller
import (
"blazing/common/socket/errorcode"
"blazing/logic/service/common"
"blazing/logic/service/player"
)
// Exelist 对应C#的List<Exeing 实现获取精灵训练数据
func (h Controller) PetExt(
data *C2S_NONO_EXE_LIST, player *player.Player) (result *S2C_NONO_EXE_LIST, err errorcode.ErrorCode) { //这个时候player应该是空的
result = &S2C_NONO_EXE_LIST{}
return
}
// C2S_NONO_EXE_LIST 定义请求或响应数据结构。
type C2S_NONO_EXE_LIST struct {
Head common.TomeeHeader `cmd:"9015" struc:"skip"`
}
// S2C_NONO_EXE_LIST 对应C#的同名结构体
type S2C_NONO_EXE_LIST struct {
// Exelist 对应C#的List<ExeingPetInfo>Go中用切片([])替代列表
ExelistLen uint32 `json:"exelistLen" struc:"sizeof=Exelist"`
Exelist []ExeingPetInfo `json:"exelist"` // 若需JSON序列化保留原字段名
}
// ExeingPetInfo 对应C#的同名结构体,存储精灵训练相关信息
type ExeingPetInfo struct {
Flag uint32 `json:"_flag"` // 应该是精灵是否在训练对应原_flag
CapTm uint32 `json:"_capTm"` // 精灵的捕捉时间对应原_capTm
PetId uint32 `json:"_petId"` // 训练精灵的id对应原_petId
RemainDay uint32 `json:"_remainDay"` // 停留天数前端用这个值除以3600疑似时间戳对应原_remainDay
Course uint32 `json:"_course"` // 课程对应原_course
}