feat(pet): 更新精灵闪光信息结构以支持更丰富的光晕效果

将 Shiny 字段从单一 uint32 值扩展为 GlowFilter 结构体数组及相关长度字段,
用于表示更复杂的闪光视觉效果。同时调整相关序列化标签及保留字段布局。

- 修改 PetInfo、PetShortInfo、ReadyFightPetInfo 等结构体中的 Shiny 表示方式
- 添加 ShinyLen 和 ShinyInfo 字段,并配置 json 与 struc 序列化选项
- 调整部分结构体中 Reserved 字段为数组形式以优化空间布局
- 更新 copier.Copy 为 copier.CopyWithOption 并启用深拷贝逻辑
- 微调经验升级顺序以确保数据一致性
- 修正地图BOSS信息判断条件并清理无用导入和注释代码
This commit is contained in:
2025-12-14 05:34:39 +08:00
parent 6368e2f2e9
commit 4b604669e4
12 changed files with 101 additions and 26 deletions

View File

@@ -52,7 +52,7 @@ type PetInfo struct {
ID uint32 `fieldDesc:"精灵编号" `
// 名字默认为全0补齐到16字节固定长度 → [16]byte
Name string `struc:"[16]byte" `
Name string `struc:"[16]byte" json:"Name,omitempty"`
// 个体值(@UInt long → uint32
Dv uint32 `struc:"uint32" `
@@ -83,24 +83,24 @@ type PetInfo struct {
// * ev:生命学习力,攻击学习力,防御学习力,特攻学习力,特防学习力,速度学习力
Ev [6]uint32 `fieldDesc:"属性" `
SkillListLen uint32 `struc:"sizeof=SkillList"`
SkillListLen uint32 `struc:"sizeof=SkillList" json:"-"`
// 技能信息固定4条空则赋值0固定长度List → [4]SkillInfo零值即符合“赋值0”
SkillList []SkillInfo
// 捕捉时间(@UInt long → 若为时间戳用uint32若需时间类型可改为time.Time需配合序列化处理
CatchTime uint32 //`json:"-"` // 显式忽略,不参与序列化
CatchTime uint32 //显式忽略,不参与序列化
OldCatchTime uint32 `struc:"skip" fieldDesc:"旧捕捉时间" `
// 捕捉地图(@UInt long → uint32
CatchMap uint32 `fieldDesc:"捕捉地图" `
CatchMap uint32 `json:"CatchMap,omitempty"`
// 未知默认0@UInt long → uint32
CatchRect uint32 `fieldDesc:"未知默认为0" `
CatchRect uint32 `json:"CatchRect,omitempty"`
// 捕获等级默认0@UInt long → uint32
CatchLevel uint32 `fieldDesc:"捕获等级 默认为0" `
EffectInfoLen uint16 `struc:"sizeof=EffectInfo"`
EffectInfoLen uint16 `struc:"sizeof=EffectInfo" json:"-"`
// 特性列表长度用UShort存储变长List → []PetEffectInfo + 长度前缀规则) 第一个一定是特性
EffectInfo []PetEffectInfo `fieldDesc:"特性列表, 长度在头部以UShort存储" serialize:"lengthFirst,lengthType=uint16,type=structArray"`
@@ -108,7 +108,7 @@ type PetInfo struct {
SkinID uint32 `fieldDesc:"皮肤id默认为0" `
// 是否闪光(@UInt long → uint320=否1=是)
ShinyLen uint32 `json:"ShinyLen,omitempty" struc:"sizeof=ShinyInfo"`
ShinyLen uint32 `json:"-" struc:"sizeof=ShinyInfo"`
ShinyInfo []GlowFilter `json:"ShinyInfo,omitempty"`
//时间轮转然后effect根据type同时只共存一个特性是1 特质是1柱子是两种魂印是一个然后异色字段然后特训技能字段
@@ -345,7 +345,7 @@ type PetEffectInfo struct {
Status byte `struc:"byte" json:"status"` //特性为1,能量珠为2
LeftCount byte `struc:"byte" json:"left_count"` //剩余次数
EID uint16 `struc:"uint16" json:"effect_id"` //特效ID
ArgsLen uint32 `struc:"sizeof=Args"`
ArgsLen uint32 `struc:"sizeof=Args" json:"-"`
Args []int ` json:"Args"` //自定义参数装载