style: 清理代码注释和格式
This commit is contained in:
@@ -7,8 +7,8 @@ import (
|
||||
// PetBargeListInboundInfo 对应Java的PetBargeListInboundInfo,实现InboundMessage接口
|
||||
type PetBargeListInboundInfo struct {
|
||||
Head common.TomeeHeader `cmd:"2309" struc:"skip"`
|
||||
StartPetId uint32 `description:"开始精灵id" codec:"startPetId"` // @UInt long 对应Go的uint32(无符号64位)
|
||||
EndPetId uint32 `description:"结束精灵id" codec:"endPetId"` // 字段标签模拟注解功能(描述、编解码标识)
|
||||
StartPetId uint32 `description:"开始精灵id" codec:"startPetId"`
|
||||
EndPetId uint32 `description:"结束精灵id" codec:"endPetId"` // 字段标签模拟注解功能(描述、编解码标识)
|
||||
}
|
||||
type C2S_9756 struct {
|
||||
Head common.TomeeHeader `cmd:"9756" struc:"skip"`
|
||||
@@ -16,7 +16,7 @@ type C2S_9756 struct {
|
||||
|
||||
// PetBargeListInfo 对应Java的PetBargeListInfo类
|
||||
type PetBargeListInfo struct {
|
||||
PetId uint32 `description:"精灵ID"` // @UInt long 对应Go的uint32(无符号64位整数)
|
||||
PetId uint32 `description:"精灵ID"`
|
||||
EnCntCnt uint32 `description:"未知"` // public字段在Go中通过首字母大写导出
|
||||
IsCatched uint32 `description:"捕获记录"` // 结构体标签模拟@FieldDescription注解
|
||||
IsKilled uint32 `description:"击杀记录"` // 字段名采用帕斯卡命名法(首字母大写)以匹配Java的public访问权限
|
||||
|
||||
@@ -4,16 +4,13 @@ import "blazing/logic/service/common"
|
||||
|
||||
// 实现InboundMessage接口,用于处理宠物设置经验的入站消息
|
||||
type PetSetExpInboundInfo struct {
|
||||
Head common.TomeeHeader `cmd:"2318" struc:"skip"`
|
||||
// CatchTime 精灵获取时间,对应Java的@UInt long
|
||||
CatchTime uint32 `fieldDescription:"精灵获取时间" uint:"true" autoCodec:"true"`
|
||||
Head common.TomeeHeader `cmd:"2318" struc:"skip"`
|
||||
CatchTime uint32 `fieldDescription:"精灵获取时间" uint:"true" autoCodec:"true"`
|
||||
|
||||
// Exp 分配经验,对应Java的@UInt long
|
||||
Exp int64 `struc:"uint32"`
|
||||
Exp int64 `struc:"uint32"`
|
||||
}
|
||||
|
||||
// 实现OutboundMessage接口,用于处理宠物设置经验的出站消息
|
||||
type PetSetExpOutboundInfo struct {
|
||||
// Exp 剩余累计经验,对应Java的@UInt long
|
||||
Exp int64 `struc:"uint32"`
|
||||
Exp int64 `struc:"uint32"`
|
||||
}
|
||||
|
||||
@@ -19,11 +19,10 @@ type GetPetListOutboundInfo struct {
|
||||
|
||||
// PetShortInfo 精灵简要信息结构体
|
||||
type PetShortInfo struct {
|
||||
ID uint32 // 精灵类型ID(
|
||||
CatchTime uint32 // 精灵生成时间
|
||||
Level uint32 // 精灵等级
|
||||
SkinID uint32 // 精灵皮肤ID
|
||||
// 是否闪光(@UInt long → uint32,0=否,1=是)
|
||||
ID uint32 // 精灵类型ID(
|
||||
CatchTime uint32 // 精灵生成时间
|
||||
Level uint32 // 精灵等级
|
||||
SkinID uint32 // 精灵皮肤ID
|
||||
ShinyLen uint32 `json:"-" struc:"sizeof=ShinyInfo"`
|
||||
ShinyInfo []data.GlowFilter `json:"ShinyInfo,omitempty"`
|
||||
}
|
||||
@@ -52,10 +51,8 @@ type RoomPetInfo struct {
|
||||
ID uint32 `fieldDesc:"精灵编号" `
|
||||
Nature uint32 `fieldDesc:"性格" `
|
||||
|
||||
// 等级(@UInt long → uint32)
|
||||
Level uint32 `fieldDesc:"等级" `
|
||||
// 当前生命(@UInt long → uint32)
|
||||
Hp uint32
|
||||
Hp uint32
|
||||
// * battle_lv: atk(0), def(1), sp_atk(2), sp_def(3), spd(4), accuracy(5)
|
||||
Prop [5]uint32 `fieldDesc:"属性" `
|
||||
SkillListLen uint32 `struc:"sizeof=SkillList"`
|
||||
|
||||
@@ -41,12 +41,11 @@ type PetShowInboundInfo struct {
|
||||
}
|
||||
|
||||
type PetShowOutboundInfo struct {
|
||||
UserID uint32 `codec:"UserID" description:"米米号"`
|
||||
CatchTime uint32 `codec:"CatchTime" description:"精灵获得的时间"`
|
||||
ID uint32 `codec:"PetID" description:"精灵编号"`
|
||||
Flag uint32 `codec:"flag" description:"1为显示 0为收回"`
|
||||
Dv uint32 `codec:"dv" description:"个体"`
|
||||
// 是否闪光(@UInt long → uint32,0=否,1=是)
|
||||
UserID uint32 `codec:"UserID" description:"米米号"`
|
||||
CatchTime uint32 `codec:"CatchTime" description:"精灵获得的时间"`
|
||||
ID uint32 `codec:"PetID" description:"精灵编号"`
|
||||
Flag uint32 `codec:"flag" description:"1为显示 0为收回"`
|
||||
Dv uint32 `codec:"dv" description:"个体"`
|
||||
ShinyLen uint32 `json:"-" struc:"sizeof=ShinyInfo"`
|
||||
ShinyInfo []data.GlowFilter `json:"ShinyInfo,omitempty"`
|
||||
SkinID uint32 `codec:"skinID" description:"皮肤ID"`
|
||||
|
||||
Reference in New Issue
Block a user