diff --git a/logic/controller/pet.go b/logic/controller/pet.go index 49b47d0c..bb24e6ac 100644 --- a/logic/controller/pet.go +++ b/logic/controller/pet.go @@ -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 +} diff --git a/logic/service/pet/BargeList.go b/logic/service/pet/BargeList.go index ef7020b6..e372dbfe 100644 --- a/logic/service/pet/BargeList.go +++ b/logic/service/pet/BargeList.go @@ -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,Go中用切片+指针实现动态列表 + PetBargeListLen uint32 `struc:"sizeof=PetBargeList"` + PetBargeList []PetBargeListInfo `description:"返回的精灵信息" codec:"petBargeList"` }