Files
bl/common/core/info/pet/PetInfo.java
昔念 f081150178 refactor(common): 重构宠物相关信息结构
- 修改 PetInfo 和 PetEffectInfo 结构体,统一字段命名规范
- 更新 SkillInfo 结构体,增加技能等级字段
- 删除未使用的 LoginUserInfo 和 ServerInfo 结构体
- 引入 google/uuid 包,用于后续可能的唯一标识生成
2025-06-22 12:32:19 +08:00

81 lines
3.0 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package org.nieo.seerproject.common.net.info.pet;
import lombok.Data;
import lombok.experimental.SuperBuilder;
import org.nieo.seerproject.common.annotations.FieldDescription;
import org.nieo.seerproject.common.annotations.serialize.ArraySerialize;
import org.nieo.seerproject.common.annotations.serialize.UInt;
import org.nieo.seerproject.common.net.info.pet.skill.SkillInfo;
import org.nieo.seerproject.common.net.serialize.ArraySerializeType;
import org.nieo.seerproject.common.net.serialize.LengthFieldType;
import java.util.ArrayList;
import java.util.List;
@Data
public class PetInfo {
@FieldDescription("精灵编号")
private @UInt long id;
@FieldDescription("名字 默认为全0 但要补齐到16字节")
@ArraySerialize(value = ArraySerializeType.FIXED_LENGTH, fixedLength = 16)
private byte[] name = new byte[16];
@FieldDescription("个体值")
private @UInt long dv;
@FieldDescription("性格")
private @UInt long nature;
@FieldDescription("等级")
private @UInt long level;
@FieldDescription("当前等级已经获得的经验 2538")
private @UInt long exp;
@FieldDescription("当前等级所需的经验")
private @UInt long lvExp;
@FieldDescription("升到下一级的经验")
private @UInt long nextLvExp;
@FieldDescription("当前生命")
private @UInt long hp;
@FieldDescription("最大生命")
private @UInt long maxHp;
@FieldDescription("攻击")
private @UInt long attack;
@FieldDescription("防御")
private @UInt long defence;
@FieldDescription("特攻")
private @UInt long specialAttack;
@FieldDescription("特防")
private @UInt long specialDefence;
@FieldDescription("速度")
private @UInt long speed;
@FieldDescription("生命学习力")
private @UInt long evHp;
@FieldDescription("攻击学习力")
private @UInt long evAttack;
@FieldDescription("防御学习力")
private @UInt long evDefence;
@FieldDescription("特攻学习力")
private @UInt long evSpecialAttack;
@FieldDescription("特防学习力")
private @UInt long evSpecialDefense;
@FieldDescription("速度学习力")
private @UInt long evSpeed;
@FieldDescription("技能个数")
private @UInt long skillSize;
@FieldDescription("32字节 技能信息 必须插入4条skillInfo若技能信息为空则要赋值成0")
@ArraySerialize(value = ArraySerializeType.FIXED_LENGTH, fixedLength = 8)
private List<SkillInfo> skillList;
@FieldDescription("捕捉时间")
private @UInt long catchTime;
@FieldDescription("捕捉地图")
private @UInt long catchMap;
@FieldDescription("未知默认为0")
private @UInt long catchRect;
@FieldDescription("捕获等级 默认为0")
private @UInt long catchLevel;
@FieldDescription("特性列表, 长度在头部以UShort存储")
@ArraySerialize(value = ArraySerializeType.LENGTH_FIRST, lengthType = LengthFieldType.UNSIGNED_SHORT)
private List<PetEffectInfo> effectInfo = new ArrayList<>();
@FieldDescription("皮肤id默认为0")
private @UInt long skinID;
@FieldDescription("是不是闪")
private @UInt long shiny;
}