```
feat(pet): 新增宠物驳船列表功能并调整数据类型 新增 Controller 方法 PetBargeList 用于处理宠物驳船列表请求, 并修改 PetBargeListInboundInfo 和 PetBargeListInfo 中部分字段的数据类型 从 uint64 调整为 uint32。同时新增 PetBargeListOutboundInfo 结构体 用于响应数据的封装。 ```
This commit is contained in:
@@ -199,3 +199,10 @@ func (h Controller) SetPetSkill(data *pet.ChangeSkillInfo, c *player.Player) (re
|
||||
CatchTime: data.CatchTime,
|
||||
}, 0
|
||||
}
|
||||
|
||||
func (h Controller) PetBargeList(data *pet.PetBargeListInboundInfo, c *player.Player) (result *pet.PetBargeListOutboundInfo, err errorcode.ErrorCode) {
|
||||
|
||||
return &pet.PetBargeListOutboundInfo{
|
||||
PetBargeList: make([]pet.PetBargeListInfo, 0),
|
||||
}, 0
|
||||
}
|
||||
|
||||
@@ -2,14 +2,19 @@ package pet
|
||||
|
||||
// PetBargeListInboundInfo 对应Java的PetBargeListInboundInfo,实现InboundMessage接口
|
||||
type PetBargeListInboundInfo struct {
|
||||
StartPetId uint64 `description:"开始精灵id" codec:"startPetId"` // @UInt long 对应Go的uint64(无符号64位)
|
||||
EndPetId uint64 `description:"结束精灵id" codec:"endPetId"` // 字段标签模拟注解功能(描述、编解码标识)
|
||||
StartPetId uint32 `description:"开始精灵id" codec:"startPetId"` // @UInt long 对应Go的uint32(无符号64位)
|
||||
EndPetId uint32 `description:"结束精灵id" codec:"endPetId"` // 字段标签模拟注解功能(描述、编解码标识)
|
||||
}
|
||||
|
||||
// PetBargeListInfo 对应Java的PetBargeListInfo类
|
||||
type PetBargeListInfo struct {
|
||||
PetId uint64 `description:"精灵ID"` // @UInt long 对应Go的uint64(无符号64位整数)
|
||||
EnCntCnt uint64 `description:"未知"` // public字段在Go中通过首字母大写导出
|
||||
IsCatched uint64 `description:"捕获记录"` // 结构体标签模拟@FieldDescription注解
|
||||
IsKilled uint64 `description:"击杀记录"` // 字段名采用帕斯卡命名法(首字母大写)以匹配Java的public访问权限
|
||||
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"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user