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

@@ -64,8 +64,8 @@ type ARENA_OWENR_ACCE struct {
// 表示"宠物王加入"的入站消息数据
type PetKingJoinInboundInfo struct {
Head common.TomeeHeader `cmd:"2413" struc:"skip"`
Type uint32 // 战斗类型5=单精灵6=多精灵11=精灵大师赛 (对应Java的@UInt long type)
FightType uint32 // 仅当Type为11时有效 (对应Java的@UInt long fightType)
Type uint32 // 战斗类型5=单精灵6=多精灵11=精灵大师赛
FightType uint32 // 仅当Type为11时有效
}
// HandleFightInviteInboundInfo 处理战斗邀请的入站消息
@@ -122,13 +122,13 @@ type LoadPercentInboundInfo struct {
type UsePetItemInboundInfo struct {
Head common.TomeeHeader `cmd:"2406" struc:"skip"`
// 字段首字母大写以导出对应Java的可访问性配合@Data的getter/setter
CatchTime uint32 `description:"精灵捕获时间" codec:"catchTime"` // @UInt long 对应Go的uint32无符号64位
CatchTime uint32 `description:"精灵捕获时间" codec:"catchTime"`
ItemId uint32 `description:"使用的物品ID" codec:"itemId"` // 结构体标签模拟@FieldDescription和@AutoCodec注解
Reversed1 uint32 `description:"填充字段 0" codec:"reversed1"` // reversed1对应原Java的填充字段
}
type ChatInfo struct {
Head common.TomeeHeader `cmd:"50002" 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')作为结束符
}