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

@@ -96,8 +96,6 @@ func (r Attr) sub() uint32 {
// PetInfo 精灵信息结构(合并后的优化版本)
type PetInfo struct {
// 精灵编号(@UInt long → uint32
ID uint32 `fieldDesc:"精灵编号" `
// 名字默认为全0补齐到16字节固定长度 → [16]byte
@@ -107,28 +105,20 @@ type PetInfo struct {
Generation uint16 `fieldDesc:"世代" `
// 个体值(@UInt long → uint32
Dv uint32 `struc:"uint32" `
// 性格(@UInt long → uint32
Nature uint32 `fieldDesc:"性格" `
// 等级(@UInt long → uint32
Level uint32 `fieldDesc:"等级" `
// 当前等级已获得经验(@UInt long → uint32
Exp int64 `struc:"uint32"`
// 当前等级所需经验(@UInt long → uint32
LvExp int64 `struc:"uint32"`
// 升到下一级的经验(@UInt long → uint32
NextLvExp int64 `struc:"uint32"`
// 当前生命(@UInt long → uint32
Hp uint32
// 最大生命(@UInt long → uint32
MaxHp uint32 `fieldDesc:"最大生命" `
// * battle_lv: atk(0), def(1), sp_atk(2), sp_def(3), spd(4), accuracy(5)
Prop [5]uint32 `fieldDesc:"属性" `
@@ -141,26 +131,20 @@ type PetInfo struct {
// 技能信息固定4条空则赋值0固定长度List → [4]SkillInfo零值即符合“赋值0”
SkillList []SkillInfo
// 捕捉时间(@UInt long → 若为时间戳用uint32若需时间类型可改为time.Time需配合序列化处理
CatchTime uint32 //显式忽略,不参与序列化
OldCatchTime uint32 `struc:"skip" fieldDesc:"旧捕捉时间" `
// 捕捉地图(@UInt long → uint32
CatchMap uint32 `json:"CatchMap,omitempty"`
// 未知默认0@UInt long → uint32
CatchRect uint32 `json:"CatchRect,omitempty"`
// 捕获等级默认0@UInt long → uint32
CatchLevel uint32 `fieldDesc:"捕获等级 默认为0" `
EffectInfoLen uint16 `struc:"sizeof=EffectInfo" json:"-"`
// 特性列表长度用UShort存储变长List → []PetEffectInfo + 长度前缀规则) 第一个一定是特性
EffectInfo []PetEffectInfo
// 皮肤ID默认0@UInt long → uint32
SkinID uint32 `fieldDesc:"皮肤id默认为0" `
// 是否闪光(@UInt long → uint320=否1=是)
ShinyLen uint32 `struc:"sizeof=ShinyInfo"`
ShinyInfo []data.GlowFilter `json:"ShinyInfo,omitempty"`