feat(pet): 新增宠物驳船列表功能并调整数据类型 新增 Controller 方法 PetBargeList 用于处理宠物驳船列表请求, 并修改 PetBargeListInboundInfo 和 PetBargeListInfo 中部分字段的数据类型 从 uint64 调整为 uint32。同时新增 PetBargeListOutboundInfo 结构体 用于响应数据的封装。 ```
21 lines
1.2 KiB
Go
21 lines
1.2 KiB
Go
package pet
|
||
|
||
// PetBargeListInboundInfo 对应Java的PetBargeListInboundInfo,实现InboundMessage接口
|
||
type PetBargeListInboundInfo struct {
|
||
StartPetId uint32 `description:"开始精灵id" codec:"startPetId"` // @UInt long 对应Go的uint32(无符号64位)
|
||
EndPetId uint32 `description:"结束精灵id" codec:"endPetId"` // 字段标签模拟注解功能(描述、编解码标识)
|
||
}
|
||
|
||
// PetBargeListInfo 对应Java的PetBargeListInfo类
|
||
type PetBargeListInfo struct {
|
||
PetId uint32 `description:"精灵ID"` // @UInt long 对应Go的uint32(无符号64位整数)
|
||
EnCntCnt uint32 `description:"未知"` // public字段在Go中通过首字母大写导出
|
||
IsCatched uint32 `description:"捕获记录"` // 结构体标签模拟@FieldDescription注解
|
||
IsKilled uint32 `description:"击杀记录"` // 字段名采用帕斯卡命名法(首字母大写)以匹配Java的public访问权限
|
||
}
|
||
type PetBargeListOutboundInfo struct {
|
||
// 对应Java的List<PetBargeListInfo>,Go中用切片+指针实现动态列表
|
||
PetBargeListLen uint32 `struc:"sizeof=PetBargeList"`
|
||
PetBargeList []PetBargeListInfo `description:"返回的精灵信息" codec:"petBargeList"`
|
||
}
|