style: 清理代码注释和格式

This commit is contained in:
xinian
2026-04-04 05:12:30 +08:00
committed by cnb
parent 31d274dd9d
commit b62b4af628
31 changed files with 863 additions and 195 deletions

View File

@@ -7,7 +7,7 @@ type CreatePlayerInboundInfo struct { //这里直接使用组合来实现将传
// 玩家昵称,@ArraySerialize注解
Nickname string `struc:"[16]byte"` // 固定长度16字节
// 机器人人物颜色 rgb@UInt注解
// 机器人人物颜色 rgb
Color uint32 `fieldDescription:"机器人人物颜色 rgb" uint:"true"`
}
type CreatePlayerOutInfo struct {

View File

@@ -20,55 +20,42 @@ type SimUserInfoOutboundInfo struct {
Color uint32 `codec:"true"`
// Texture 纹理 0
// 对应 Java 注解: @FieldDescription("纹理 0") @UInt
Texture uint32 `codec:"true"`
// Vip 默认值 1 位置
// 对应 Java 注解: @FieldDescription("默认值 1 位置") @UInt
Vip uint32 `codec:"true"`
// Status 默认值0 未知
// 对应 Java 注解: @FieldDescription("默认值0 未知") @UInt
Status uint32 `codec:"true"`
// MapType 地图类型 进入地图包传入的字段
// 对应 Java 注解: @FieldDescription("地图类型 进入地图包传入的字段") @UInt
MapType uint32 `codec:"true"`
// MapID 地图id
// 对应 Java 注解: @FieldDescription("地图id") @UInt
MapID uint32 `codec:"true"`
// IsCanBeTeacher 能不能做教官
// 对应 Java 注解: @FieldDescription("能不能做教官") @UInt
IsCanBeTeacher uint32 `codec:"true"`
// TeacherID 教官id
// 对应 Java 注解: @FieldDescription("教官id") @UInt
TeacherID uint32 `codec:"true"`
// StudentID 学生id
// 对应 Java 注解: @FieldDescription("学生id") @UInt
StudentID uint32 `codec:"true"`
// GraduationCount 教官成绩
// 对应 Java 注解: @FieldDescription("教官成绩") @UInt
GraduationCount uint32 `codec:"true"`
// VipLevel vip等级 8
// 对应 Java 注解: @FieldDescription("vip等级 8") @UInt
VipLevel uint32 `codec:"true"`
// TeamId 战队id
// 对应 Java 注解: @FieldDescription("战队id") @UInt
TeamId uint32 `codec:"true"`
// IsShow 有没有跟随的精灵
// 对应 Java 注解: @FieldDescription("有没有跟随的精灵") @UInt
IsShow uint32 `codec:"true"`
ClothesCount uint32 `struc:"sizeof=Clothes" json:"clothes_count"` // 穿戴装备数量
// Clothes 穿戴装备
// 对应 Java 注解: @FieldDescription("穿戴装备") @Builder.Default
Clothes []model.PeopleItemInfo `codec:"true"`
}
type MoreUserInfoInboundInfo struct {
@@ -77,7 +64,6 @@ type MoreUserInfoInboundInfo struct {
}
type MoreUserInfoOutboundInfo struct {
// UserID 米米号
// 对应 Java 注解: @FieldDescription("米米号") @UInt
UserID uint32 `codec:"true"`
Nick string `struc:"[16]byte" default:"seer" json:"nick"` // 16字节昵称
@@ -85,35 +71,27 @@ type MoreUserInfoOutboundInfo struct {
RegisterTime uint32 `struc:"uint32" json:"register_time"` // 注册时间(秒时间戳)
// PetAllNum 所有精灵数量
// 对应 Java 注解: @FieldDescription("所有精灵数量") @UInt
AllPetNumber uint32 `codec:"true"`
// PetMaxLev 精灵最大等级
// 对应 Java 注解: @FieldDescription("精灵最大等级") @UInt
PetMaxLevel uint32 `codec:"true"`
// BossAchievement spt boos成就 20字节 以任务状态完成 3为击败该boss, 目前spt只有12个, 剩下的长度以3填充
// 对应 Java 注解: @FieldDescription(...) @ArraySerialize(value = ArraySerializeType.FIXED_LENGTH, fixedLength = 20) @Builder.Default
BossAchievement [20]byte `codec:"true"`
// GraduationCount 教官成绩
// 对应 Java 注解: @FieldDescription("教官成绩") @UInt
GraduationCount uint32 `codec:"true"`
// MonKingWin 精灵王胜场
// 对应 Java 注解: @FieldDescription("精灵王胜场") @UInt
MonKingWin uint32 `codec:"true"`
// MessWin 大乱斗胜场
// 对应 Java 注解: @FieldDescription("大乱斗胜场") @UInt
MessWin uint32 `codec:"true"`
// MaxStage 勇者之塔层数
// 对应 Java 注解: @FieldDescription("勇者之塔层数") @UInt
MaxStage uint32 `codec:"true"`
// MaxArenaWins 星际擂台胜场
// 对应 Java 注解: @FieldDescription("星际擂台胜场") @UInt
MaxArenaWins uint32 `codec:"true"`
}

View File

@@ -4,48 +4,48 @@ import "blazing/logic/service/common"
type ChatInboundInfo struct {
Head common.TomeeHeader `cmd:"2102" struc:"skip"`
Reserve uint32 `json:"reserve" fieldDescription:"填充 默认值为0" uint:"true"` // @UInt long reserve无符号长整数
Reserve uint32 `json:"reserve" fieldDescription:"填充 默认值为0" uint:"true"`
MessageLen uint32 `struc:"sizeof=Message"`
Message string `json:"message" fieldDescription:"消息内容, 结束符为utf-8的数字0"` // 消息内容包含utf-8空字符('\x00')作为结束符
}
type ChatOutboundInfo struct {
SenderId uint32 `description:"发送人的米米号" codec:"uint"` // @UInt long -> uint64
SenderId uint32 `description:"发送人的米米号" codec:"uint"`
SenderNickname string `struc:"[16]byte" default:"seer" json:"nick"` // 固定16字节的字符串对应@ArraySerialize注解
ToId uint32 `description:"可能是私聊用的 公屏发送时为0" codec:"uint"` // @UInt long -> uint64
ToId uint32 `description:"可能是私聊用的 公屏发送时为0" codec:"uint"`
MessageLen uint32 `struc:"sizeof=Message"`
Message string `description:"这里的内容没有结束符" codec:"string"` // String -> string
}
type ChangeColorInboundInfo struct {
Head common.TomeeHeader `cmd:"2063" struc:"skip"`
Color uint32 `codec:"color"` // 更改的颜色 rgb (对应Java的@UInt long)
Color uint32 `codec:"color"` // 更改的颜色 rgb
}
type ChangeColorOutboundInfo struct {
UserId uint32 `codec:"userId"` // 更改人的用户id (对应Java的@UInt long)
Color uint32 `codec:"color"` // 前端发来的更改的颜色rgb值 (对应Java的@UInt long)
Texture uint32 `codec:"texture"` // 大概是当前的涂装 by 7 (对应Java的@UInt long)
UserId uint32 `codec:"userId"` // 更改人的用户id
Color uint32 `codec:"color"` // 前端发来的更改的颜色rgb值
Texture uint32 `codec:"texture"` // 大概是当前的涂装 by 7
Coins int64 `struc:"uint32"`
}
type ChangeDoodleInboundInfo struct {
Head common.TomeeHeader `cmd:"2062" struc:"skip"`
Id uint32 `codec:"id"` // 涂鸦ID (对应Java的@UInt long)
Color uint32 `codec:"color"` // 前端发来的更改的颜色rgb值 (对应Java的@UInt long)
Id uint32 `codec:"id"` // 涂鸦ID
Color uint32 `codec:"color"` // 前端发来的更改的颜色rgb值
}
type ChangeDoodleOutboundInfo struct {
UserId uint32 `codec:"userId"` // 更改人的userid (对应Java的@UInt long)
Color uint32 `codec:"color"` // 使用前端发的id 从itemInfo中获得 (对应Java的@UInt long)
Texture uint32 `codec:"texture"` // 使用前端发的id 从itemInfo中获得 (对应Java的@UInt long)
Coins int64 `struc:"uint32"`
UserId uint32 `codec:"userId"` // 更改人的userid
Color uint32 `codec:"color"` // 使用前端发的id 从itemInfo中获得
Texture uint32 `codec:"texture"` // 使用前端发的id 从itemInfo中获得
Coins int64 `struc:"uint32"`
}
type ChangeNONOColorInboundInfo struct {
Head common.TomeeHeader `cmd:"9012" struc:"skip"`
Color uint32 `codec:"color"` // 更改的颜色 rgb (对应Java的@UInt long)
Color uint32 `codec:"color"` // 更改的颜色 rgb
}
type ChangeNONOColorOutboundInfo struct {
UserID uint32 `codec:"userId"` // 更改人的用户id (对应Java的@UInt long)
Color uint32 `codec:"color"` // 前端发来的更改的颜色rgb值 (对应Java的@UInt long)
UserID uint32 `codec:"userId"` // 更改人的用户id
Color uint32 `codec:"color"` // 前端发来的更改的颜色rgb值
}