refactor(common): 重构宠物相关信息结构
- 修改 PetInfo 和 PetEffectInfo 结构体,统一字段命名规范 - 更新 SkillInfo 结构体,增加技能等级字段 - 删除未使用的 LoginUserInfo 和 ServerInfo 结构体 - 引入 google/uuid 包,用于后续可能的唯一标识生成
This commit is contained in:
7
common/core/info/pet/GetPetInfoInboundInfo.go
Normal file
7
common/core/info/pet/GetPetInfoInboundInfo.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package pet
|
||||
|
||||
// GetPetInfoInboundInfo 获取宠物信息入站请求
|
||||
type GetPetInfoInboundInfo struct {
|
||||
// 精灵生成时间
|
||||
CatchTime uint64 `json:"catchTime"`
|
||||
}
|
||||
16
common/core/info/pet/GetPetInfoOutboundInfo.java
Normal file
16
common/core/info/pet/GetPetInfoOutboundInfo.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package org.nieo.seerproject.common.net.info.pet;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.FieldDescription;
|
||||
import org.nieo.seerproject.common.annotations.OutboundMessageType;
|
||||
import org.nieo.seerproject.common.annotations.serialize.AutoCodec;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
import org.nieo.seerproject.common.net.OutboundMessage;
|
||||
|
||||
@AutoCodec
|
||||
@Data
|
||||
@OutboundMessageType(MessageCommandIDRegistry.Get_Pet_Info)
|
||||
public class GetPetInfoOutboundInfo implements OutboundMessage {
|
||||
@FieldDescription("精灵信息")
|
||||
private PetInfo petInfo;
|
||||
}
|
||||
13
common/core/info/pet/PetCureInboundInfo.java
Normal file
13
common/core/info/pet/PetCureInboundInfo.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package org.nieo.seerproject.common.net.info.pet;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.InboundMessageType;
|
||||
import org.nieo.seerproject.common.annotations.serialize.AutoCodec;
|
||||
import org.nieo.seerproject.common.net.InboundMessage;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
|
||||
@Data
|
||||
@AutoCodec
|
||||
@InboundMessageType(MessageCommandIDRegistry.Pet_Cure)
|
||||
public class PetCureInboundInfo implements InboundMessage {
|
||||
}
|
||||
13
common/core/info/pet/PetCureOutboundInfo.java
Normal file
13
common/core/info/pet/PetCureOutboundInfo.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package org.nieo.seerproject.common.net.info.pet;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.OutboundMessageType;
|
||||
import org.nieo.seerproject.common.annotations.serialize.AutoCodec;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
import org.nieo.seerproject.common.net.OutboundMessage;
|
||||
|
||||
@Data
|
||||
@AutoCodec
|
||||
@OutboundMessageType(MessageCommandIDRegistry.Pet_Cure)
|
||||
public class PetCureOutboundInfo implements OutboundMessage {
|
||||
}
|
||||
@@ -1,21 +1,28 @@
|
||||
package pet
|
||||
|
||||
// PetEffectInfo 精灵特性信息结构体
|
||||
type PetEffectInfo struct {
|
||||
ItemID uint32 // 特性晶片对应的物品id
|
||||
Status byte // 默认为1
|
||||
LeftCount byte // 未知默认为0
|
||||
EffectID uint16 // 特性id
|
||||
Reserve1 byte // 保留字段1
|
||||
Reserve2 byte // 保留字段2无作用
|
||||
Reserve3 byte // 保留字段3
|
||||
Reserve4 [13]byte // 保留字段4 占13字节
|
||||
// SkillInfo 临时技能信息结构体(实际项目应补充完整定义)
|
||||
type SkillInfo struct {
|
||||
SkillId uint32 // 技能ID
|
||||
Level uint32 // 技能等级
|
||||
}
|
||||
package pet
|
||||
|
||||
// NewPetEffectInfo 创建一个新的精灵特性信息实例
|
||||
func NewPetEffectInfo() *PetEffectInfo {
|
||||
return &PetEffectInfo{
|
||||
Status: 1,
|
||||
Reserve4: [13]byte{},
|
||||
}
|
||||
// PetEffectInfo 宠物特性信息
|
||||
type PetEffectInfo struct {
|
||||
// ItemId 特性晶片对应的物品id
|
||||
ItemId uint64
|
||||
// Status 默认为1
|
||||
Status byte
|
||||
// LeftCount 未知默认为0
|
||||
LeftCount byte
|
||||
// EffectId 特性id
|
||||
EffectId uint16
|
||||
// Reserve1 保留字段1
|
||||
Reserve1 byte
|
||||
// Reserve2 保留字段2无作用
|
||||
Reserve2 byte
|
||||
// Reserve3 保留字段3
|
||||
Reserve3 byte
|
||||
// Reserve4 保留字段4(13字节)
|
||||
Reserve4 [13]byte
|
||||
}
|
||||
|
||||
34
common/core/info/pet/PetEffectInfo.java
Normal file
34
common/core/info/pet/PetEffectInfo.java
Normal file
@@ -0,0 +1,34 @@
|
||||
package org.nieo.seerproject.common.net.info.pet;
|
||||
|
||||
import lombok.Builder;
|
||||
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.annotations.serialize.UShort;
|
||||
import org.nieo.seerproject.common.net.serialize.ArraySerializeType;
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
public class PetEffectInfo {
|
||||
@FieldDescription("特性晶片对应的物品id")
|
||||
public @UInt long itemID;
|
||||
@FieldDescription("默认为1")
|
||||
@Builder.Default
|
||||
public byte status = 1;
|
||||
@FieldDescription("未知默认为0")
|
||||
public byte leftCount;
|
||||
@FieldDescription("特性id")
|
||||
public @UShort int effectID;
|
||||
@FieldDescription("保留字段1")
|
||||
public byte reserve1;
|
||||
@FieldDescription("保留字段2无作用")
|
||||
public byte reserve2;
|
||||
@FieldDescription("保留字段3")
|
||||
public byte reserve3;
|
||||
@FieldDescription("保留字段4 占13字节")
|
||||
@Builder.Default
|
||||
@ArraySerialize(value = ArraySerializeType.FIXED_LENGTH, fixedLength = 13)
|
||||
public byte[] reserve4 = new byte[13];
|
||||
}
|
||||
@@ -1,54 +1,69 @@
|
||||
package pet
|
||||
|
||||
import (
|
||||
"blazing/common/core/info/pet/skill"
|
||||
"time"
|
||||
"common/core/info/pet/skill"
|
||||
)
|
||||
|
||||
// PetInfo 精灵信息结构体
|
||||
// PetInfo 宠物基本信息
|
||||
type PetInfo struct {
|
||||
ID uint32 // 精灵编号
|
||||
Name string `serialize:"fixed:16"` // 定长模式:16字节 // 名字 默认为全0 但要补齐到16字节
|
||||
DV uint32 // 个体值
|
||||
Nature uint32 // 性格
|
||||
Level uint32 // 等级
|
||||
Exp uint32 // 当前等级已经获得的经验
|
||||
LvExp uint32 // 当前等级所需的经验
|
||||
NextLvExp uint32 // 升到下一级的经验
|
||||
HP uint32 // 当前生命
|
||||
MaxHP uint32 // 最大生命
|
||||
Attack uint32 // 攻击
|
||||
Defence uint32 // 防御
|
||||
SpecialAttack uint32 // 特攻
|
||||
SpecialDefence uint32 // 特防
|
||||
Speed uint32 // 速度
|
||||
EVHP uint32 // 生命学习力
|
||||
EVAttack uint32 // 攻击学习力
|
||||
EVDefence uint32 // 防御学习力
|
||||
EVSpecialAttack uint32 // 特攻学习力
|
||||
EVSpecialDefense uint32 // 特防学习力
|
||||
EVSpeed uint32 // 速度学习力
|
||||
SkillSize uint32 // 技能个数
|
||||
SkillList [4]skill.SkillInfo `serialize:"fixed:8"` // 32字节 技能信息 必须插入4条skillInfo,若技能信息为空则要赋值成0
|
||||
CatchTime uint32 // 捕捉时间
|
||||
CatchMap uint32 // 捕捉地图
|
||||
CatchRect uint32 // 未知默认为0
|
||||
CatchLevel uint32 // 捕获等级 默认为0
|
||||
EffectInfo []PetEffectInfo `serialize:"varlen:2"` // 特性列表, 长度在头部以UShort存储
|
||||
SkinID uint32 // 皮肤id默认为0
|
||||
Shiny uint32 // 是不是闪
|
||||
}
|
||||
|
||||
// NewPetInfo 创建一个新的精灵信息实例
|
||||
func NewPetInfo() *PetInfo {
|
||||
return &PetInfo{
|
||||
Name: "",
|
||||
SkillList: [4]skill.SkillInfo{},
|
||||
EffectInfo: make([]PetEffectInfo, 0),
|
||||
}
|
||||
}
|
||||
|
||||
// GetCatchTimeAsTime 将捕捉时间转换为time.Time类型
|
||||
func (p *PetInfo) GetCatchTimeAsTime() time.Time {
|
||||
return time.Unix(int64(p.CatchTime), 0)
|
||||
// Id 精灵编号
|
||||
Id uint64
|
||||
// Name 名字,长度为16字节
|
||||
Name [16]byte
|
||||
// Dv 个体值
|
||||
Dv uint64
|
||||
// Nature 性格
|
||||
Nature uint64
|
||||
// Level 等级
|
||||
Level uint64
|
||||
// Exp 当前等级已获得的经验
|
||||
Exp uint64
|
||||
// LvExp 当前等级所需的经验
|
||||
LvExp uint64
|
||||
// NextLvExp 升到下一级的经验
|
||||
NextLvExp uint64
|
||||
// Hp 当前生命
|
||||
Hp uint64
|
||||
// MaxHp 最大生命
|
||||
MaxHp uint64
|
||||
// Attack 攻击
|
||||
Attack uint64
|
||||
// Defence 防御
|
||||
Defence uint64
|
||||
// SpecialAttack 特攻
|
||||
SpecialAttack uint64
|
||||
// SpecialDefence 特防
|
||||
SpecialDefence uint64
|
||||
// Speed 速度
|
||||
Speed uint64
|
||||
// EvHp 生命学习力
|
||||
EvHp uint64
|
||||
// EvAttack 攻击学习力
|
||||
EvAttack uint64
|
||||
// EvDefence 防御学习力
|
||||
EvDefence uint64
|
||||
// EvSpecialAttack 特攻学习力
|
||||
EvSpecialAttack uint64
|
||||
// EvSpecialDefense 特防学习力
|
||||
EvSpecialDefense uint64
|
||||
// EvSpeed 速度学习力
|
||||
EvSpeed uint64
|
||||
// SkillSize 技能个数
|
||||
SkillSize uint64
|
||||
// SkillList 技能信息列表
|
||||
SkillList []skill.SkillInfo
|
||||
// CatchTime 捕捉时间
|
||||
CatchTime uint64
|
||||
// CatchMap 捕捉地图
|
||||
CatchMap uint64
|
||||
// CatchRect 未知默认为0
|
||||
CatchRect uint64
|
||||
// CatchLevel 捕获等级默认为0
|
||||
CatchLevel uint64
|
||||
// EffectInfo 特性列表
|
||||
EffectInfo []PetEffectInfo
|
||||
// SkinID 皮肤id默认为0
|
||||
SkinID uint64
|
||||
// Shiny 是否为闪
|
||||
Shiny uint64
|
||||
}
|
||||
|
||||
80
common/core/info/pet/PetInfo.java
Normal file
80
common/core/info/pet/PetInfo.java
Normal file
@@ -0,0 +1,80 @@
|
||||
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;
|
||||
}
|
||||
17
common/core/info/pet/PetOneCureInboundInfo.java
Normal file
17
common/core/info/pet/PetOneCureInboundInfo.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package org.nieo.seerproject.common.net.info.pet;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.FieldDescription;
|
||||
import org.nieo.seerproject.common.annotations.InboundMessageType;
|
||||
import org.nieo.seerproject.common.annotations.serialize.AutoCodec;
|
||||
import org.nieo.seerproject.common.annotations.serialize.UInt;
|
||||
import org.nieo.seerproject.common.net.InboundMessage;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
|
||||
@Data
|
||||
@AutoCodec
|
||||
@InboundMessageType(MessageCommandIDRegistry.Pet_One_Cure)
|
||||
public class PetOneCureInboundInfo implements InboundMessage {
|
||||
@FieldDescription("精灵捕捉时间")
|
||||
private @UInt long catchTime;
|
||||
}
|
||||
17
common/core/info/pet/PetOneCureOutboundInfo.java
Normal file
17
common/core/info/pet/PetOneCureOutboundInfo.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package org.nieo.seerproject.common.net.info.pet;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.FieldDescription;
|
||||
import org.nieo.seerproject.common.annotations.OutboundMessageType;
|
||||
import org.nieo.seerproject.common.annotations.serialize.AutoCodec;
|
||||
import org.nieo.seerproject.common.annotations.serialize.UInt;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
import org.nieo.seerproject.common.net.OutboundMessage;
|
||||
|
||||
@Data
|
||||
@AutoCodec
|
||||
@OutboundMessageType(MessageCommandIDRegistry.Pet_One_Cure)
|
||||
public class PetOneCureOutboundInfo implements OutboundMessage {
|
||||
@FieldDescription("精灵捕捉时间")
|
||||
private @UInt long catchTime;
|
||||
}
|
||||
9
common/core/info/pet/PetSetExpInboundInfo.go
Normal file
9
common/core/info/pet/PetSetExpInboundInfo.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package pet
|
||||
|
||||
// PetSetExpInboundInfo 宠物设置经验输入信息
|
||||
type PetSetExpInboundInfo struct {
|
||||
// CatchTime 精灵获取时间
|
||||
CatchTime uint64 `json:"catchTime"`
|
||||
// Exp 分配经验
|
||||
Exp uint64 `json:"exp"`
|
||||
}
|
||||
19
common/core/info/pet/PetSetExpInboundInfo.java
Normal file
19
common/core/info/pet/PetSetExpInboundInfo.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package org.nieo.seerproject.common.net.info.pet;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.FieldDescription;
|
||||
import org.nieo.seerproject.common.annotations.InboundMessageType;
|
||||
import org.nieo.seerproject.common.annotations.serialize.AutoCodec;
|
||||
import org.nieo.seerproject.common.annotations.serialize.UInt;
|
||||
import org.nieo.seerproject.common.net.InboundMessage;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
|
||||
@AutoCodec
|
||||
@Data
|
||||
@InboundMessageType(MessageCommandIDRegistry.Pet_Set_Exp)
|
||||
public class PetSetExpInboundInfo implements InboundMessage {
|
||||
@FieldDescription("精灵获取时间")
|
||||
private @UInt long catchTime;
|
||||
@FieldDescription("分配经验")
|
||||
private @UInt long exp;
|
||||
}
|
||||
7
common/core/info/pet/PetSetExpOutboundInfo.go
Normal file
7
common/core/info/pet/PetSetExpOutboundInfo.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package pet
|
||||
|
||||
// PetSetExpOutboundInfo 宠物设置经验输出信息
|
||||
type PetSetExpOutboundInfo struct {
|
||||
// Exp 剩余累计经验
|
||||
Exp uint64 `json:"exp"`
|
||||
}
|
||||
19
common/core/info/pet/PetSetExpOutboundInfo.java
Normal file
19
common/core/info/pet/PetSetExpOutboundInfo.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package org.nieo.seerproject.common.net.info.pet;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.FieldDescription;
|
||||
import org.nieo.seerproject.common.annotations.OutboundMessageType;
|
||||
import org.nieo.seerproject.common.annotations.serialize.AutoCodec;
|
||||
import org.nieo.seerproject.common.annotations.serialize.UInt;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
import org.nieo.seerproject.common.net.OutboundMessage;
|
||||
|
||||
@AutoCodec
|
||||
@Data
|
||||
@Builder
|
||||
@OutboundMessageType(MessageCommandIDRegistry.Pet_Set_Exp)
|
||||
public class PetSetExpOutboundInfo implements OutboundMessage {
|
||||
@FieldDescription("剩余累计经验")
|
||||
private @UInt long exp;
|
||||
}
|
||||
24
common/core/info/pet/PetShortInfo.java
Normal file
24
common/core/info/pet/PetShortInfo.java
Normal file
@@ -0,0 +1,24 @@
|
||||
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.AutoCodec;
|
||||
import org.nieo.seerproject.common.annotations.serialize.UInt;
|
||||
|
||||
@Data
|
||||
@AutoCodec
|
||||
@SuperBuilder
|
||||
public class PetShortInfo{
|
||||
|
||||
@FieldDescription("精灵类型ID")
|
||||
private @UInt long typeId;
|
||||
@FieldDescription("精灵生成时间")
|
||||
private @UInt long catchTime;
|
||||
@FieldDescription("当前等级")
|
||||
private @UInt long level;
|
||||
@FieldDescription("精灵皮肤ID")
|
||||
private @UInt long skinId;
|
||||
@FieldDescription("是否为闪光")
|
||||
private @UInt long isShiny;
|
||||
}
|
||||
7
common/core/info/pet/PetShowInboundInfo.go
Normal file
7
common/core/info/pet/PetShowInboundInfo.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package pet
|
||||
|
||||
// PetShowInboundInfo 宠物展示输入信息
|
||||
type PetShowInboundInfo struct {
|
||||
CatchTime uint64 `json:"catchTime"` // 捕捉时间
|
||||
Flag uint64 `json:"flag"` // 标志位
|
||||
}
|
||||
16
common/core/info/pet/PetShowInboundInfo.java
Normal file
16
common/core/info/pet/PetShowInboundInfo.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package org.nieo.seerproject.common.net.info.pet;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.InboundMessageType;
|
||||
import org.nieo.seerproject.common.annotations.serialize.AutoCodec;
|
||||
import org.nieo.seerproject.common.annotations.serialize.UInt;
|
||||
import org.nieo.seerproject.common.net.InboundMessage;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
|
||||
@Data
|
||||
@AutoCodec
|
||||
@InboundMessageType(MessageCommandIDRegistry.Pet_Show)
|
||||
public class PetShowInboundInfo implements InboundMessage {
|
||||
private @UInt long catchTime;
|
||||
private @UInt long flag;
|
||||
}
|
||||
25
common/core/info/pet/PetShowOutboundInfo.go
Normal file
25
common/core/info/pet/PetShowOutboundInfo.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package pet
|
||||
|
||||
// PetShowOutboundInfo 宠物展示输出信息
|
||||
type PetShowOutboundInfo struct {
|
||||
// UserId 米米号
|
||||
UserId uint64 `json:"userId"`
|
||||
// CatchTime 精灵获得的时间
|
||||
CatchTime uint64 `json:"catchTime"`
|
||||
// PetId 精灵编号
|
||||
PetId uint64 `json:"petId"`
|
||||
// Flag 1为显示 0为收回
|
||||
Flag uint64 `json:"flag"`
|
||||
// Dv 个体
|
||||
Dv uint64 `json:"dv"`
|
||||
// Shiny 闪
|
||||
Shiny uint64 `json:"shiny"`
|
||||
// SkinID 皮肤id
|
||||
SkinID uint64 `json:"skinID"`
|
||||
// Reserved 填充字段
|
||||
Reserved uint64 `json:"reserved"`
|
||||
// Reserved1 填充字段
|
||||
Reserved1 uint64 `json:"reserved1"`
|
||||
// Reserved2 填充字段
|
||||
Reserved2 uint64 `json:"reserved2"`
|
||||
}
|
||||
35
common/core/info/pet/PetShowOutboundInfo.java
Normal file
35
common/core/info/pet/PetShowOutboundInfo.java
Normal file
@@ -0,0 +1,35 @@
|
||||
package org.nieo.seerproject.common.net.info.pet;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.FieldDescription;
|
||||
import org.nieo.seerproject.common.annotations.OutboundMessageType;
|
||||
import org.nieo.seerproject.common.annotations.serialize.AutoCodec;
|
||||
import org.nieo.seerproject.common.annotations.serialize.UInt;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
import org.nieo.seerproject.common.net.OutboundMessage;
|
||||
|
||||
@Data
|
||||
@AutoCodec
|
||||
@OutboundMessageType(MessageCommandIDRegistry.Pet_Show)
|
||||
public class PetShowOutboundInfo implements OutboundMessage {
|
||||
@FieldDescription("米米号")
|
||||
private @UInt long UserID;
|
||||
@FieldDescription("精灵获得的时间")
|
||||
private @UInt long CatchTime;
|
||||
@FieldDescription("精灵编号")
|
||||
private @UInt long PetID;
|
||||
@FieldDescription("1为显示 0为收回")
|
||||
private @UInt long flag;
|
||||
@FieldDescription("个体")
|
||||
private @UInt long dv;
|
||||
@FieldDescription("闪")
|
||||
private @UInt long shiny;
|
||||
@FieldDescription("皮肤id")
|
||||
private @UInt long skinID;
|
||||
@FieldDescription("填充字段")
|
||||
private @UInt long reserved;
|
||||
@FieldDescription("填充字段")
|
||||
private @UInt long reserved1;
|
||||
@FieldDescription("填充字段")
|
||||
private @UInt long reserved2;
|
||||
}
|
||||
15
common/core/info/pet/PetSkillSwitchInboundInfo.java
Normal file
15
common/core/info/pet/PetSkillSwitchInboundInfo.java
Normal file
@@ -0,0 +1,15 @@
|
||||
package org.nieo.seerproject.common.net.info.pet;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.InboundMessageType;
|
||||
import org.nieo.seerproject.common.annotations.serialize.AutoCodec;
|
||||
import org.nieo.seerproject.common.net.InboundMessage;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
import org.nieo.seerproject.common.net.info.pet.skill.ChangeSkillInfo;
|
||||
|
||||
@AutoCodec
|
||||
@Data
|
||||
@InboundMessageType(MessageCommandIDRegistry.Pet_Skill_Switch)
|
||||
public class PetSkillSwitchInboundInfo implements InboundMessage {
|
||||
private ChangeSkillInfo skillInfo;
|
||||
}
|
||||
17
common/core/info/pet/PetSkillSwitchOutboundInfo.java
Normal file
17
common/core/info/pet/PetSkillSwitchOutboundInfo.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package org.nieo.seerproject.common.net.info.pet;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.OutboundMessageType;
|
||||
import org.nieo.seerproject.common.annotations.serialize.AutoCodec;
|
||||
import org.nieo.seerproject.common.annotations.serialize.UInt;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
import org.nieo.seerproject.common.net.OutboundMessage;
|
||||
|
||||
@AutoCodec
|
||||
@Data
|
||||
@Builder
|
||||
@OutboundMessageType(MessageCommandIDRegistry.Pet_Skill_Switch)
|
||||
public class PetSkillSwitchOutboundInfo implements OutboundMessage {
|
||||
private @UInt long catchTime;
|
||||
}
|
||||
15
common/core/info/pet/PetStudySkillInboundInfo.java
Normal file
15
common/core/info/pet/PetStudySkillInboundInfo.java
Normal file
@@ -0,0 +1,15 @@
|
||||
package org.nieo.seerproject.common.net.info.pet;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.InboundMessageType;
|
||||
import org.nieo.seerproject.common.annotations.serialize.AutoCodec;
|
||||
import org.nieo.seerproject.common.net.InboundMessage;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
import org.nieo.seerproject.common.net.info.pet.skill.ChangeSkillInfo;
|
||||
|
||||
@Data
|
||||
@AutoCodec
|
||||
@InboundMessageType(MessageCommandIDRegistry.Pet_Study_Skill)
|
||||
public class PetStudySkillInboundInfo implements InboundMessage {
|
||||
private ChangeSkillInfo skillInfo;
|
||||
}
|
||||
17
common/core/info/pet/PetStudySkillOutboundInfo.java
Normal file
17
common/core/info/pet/PetStudySkillOutboundInfo.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package org.nieo.seerproject.common.net.info.pet;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.OutboundMessageType;
|
||||
import org.nieo.seerproject.common.annotations.serialize.AutoCodec;
|
||||
import org.nieo.seerproject.common.annotations.serialize.UInt;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
import org.nieo.seerproject.common.net.OutboundMessage;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AutoCodec
|
||||
@OutboundMessageType(MessageCommandIDRegistry.Pet_Study_Skill)
|
||||
public class PetStudySkillOutboundInfo implements OutboundMessage {
|
||||
private @UInt long catchTime;
|
||||
}
|
||||
23
common/core/info/pet/PetUpdateOutboundInfo.java
Normal file
23
common/core/info/pet/PetUpdateOutboundInfo.java
Normal file
@@ -0,0 +1,23 @@
|
||||
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.OutboundMessageType;
|
||||
import org.nieo.seerproject.common.annotations.serialize.AutoCodec;
|
||||
import org.nieo.seerproject.common.annotations.serialize.UInt;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
import org.nieo.seerproject.common.net.OutboundMessage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@AutoCodec
|
||||
@SuperBuilder
|
||||
@Data
|
||||
@OutboundMessageType(MessageCommandIDRegistry.Note_Update_Prop)
|
||||
public class PetUpdateOutboundInfo implements OutboundMessage {
|
||||
@FieldDescription("未知字段,默认为0")
|
||||
private @UInt long addition;
|
||||
@FieldDescription("更新数据")
|
||||
private List<UpdatePropInfo> data;
|
||||
}
|
||||
21
common/core/info/pet/RoomPetInfoInboundInfo.java
Normal file
21
common/core/info/pet/RoomPetInfoInboundInfo.java
Normal file
@@ -0,0 +1,21 @@
|
||||
package org.nieo.seerproject.common.net.info.pet;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.FieldDescription;
|
||||
import org.nieo.seerproject.common.annotations.InboundMessageType;
|
||||
import org.nieo.seerproject.common.annotations.serialize.AutoCodec;
|
||||
import org.nieo.seerproject.common.annotations.serialize.UInt;
|
||||
import org.nieo.seerproject.common.net.InboundMessage;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
|
||||
@AutoCodec
|
||||
@Data
|
||||
@InboundMessageType(MessageCommandIDRegistry.Pet_Room)
|
||||
public class RoomPetInfoInboundInfo implements InboundMessage {
|
||||
|
||||
@FieldDescription("精灵所属主人的用户ID")
|
||||
private @UInt long ownerID;
|
||||
|
||||
@FieldDescription("精灵的捕获时间")
|
||||
private @UInt long catchTime;
|
||||
}
|
||||
54
common/core/info/pet/RoomPetInfoOutboundInfo.java
Normal file
54
common/core/info/pet/RoomPetInfoOutboundInfo.java
Normal file
@@ -0,0 +1,54 @@
|
||||
package org.nieo.seerproject.common.net.info.pet;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.FieldDescription;
|
||||
import org.nieo.seerproject.common.annotations.OutboundMessageType;
|
||||
import org.nieo.seerproject.common.annotations.serialize.ArraySerialize;
|
||||
import org.nieo.seerproject.common.annotations.serialize.AutoCodec;
|
||||
import org.nieo.seerproject.common.annotations.serialize.UInt;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
import org.nieo.seerproject.common.net.OutboundMessage;
|
||||
import org.nieo.seerproject.common.net.serialize.ArraySerializeType;
|
||||
|
||||
@AutoCodec
|
||||
@Data
|
||||
@OutboundMessageType(MessageCommandIDRegistry.Pet_Room)
|
||||
public class RoomPetInfoOutboundInfo implements OutboundMessage {
|
||||
|
||||
@FieldDescription("精灵所属主人的用户ID")
|
||||
private @UInt long ownerID; // 与前端发送过来的包数据相同
|
||||
|
||||
@FieldDescription("精灵的捕获时间")
|
||||
private @UInt long catchTime; // 与前端发送过来的包数据相同
|
||||
|
||||
@FieldDescription("精灵的类别ID")
|
||||
public @UInt long id;
|
||||
|
||||
@FieldDescription("精灵的性格id")
|
||||
public @UInt long nature;
|
||||
|
||||
@FieldDescription("精灵的等级")
|
||||
public @UInt long lv;
|
||||
|
||||
@FieldDescription("精灵的HP")
|
||||
public @UInt long hp;
|
||||
|
||||
@FieldDescription("精灵的攻击")
|
||||
public @UInt long atk;
|
||||
|
||||
@FieldDescription("精灵的防御")
|
||||
public @UInt long def;
|
||||
|
||||
@FieldDescription("精灵的特攻")
|
||||
public @UInt long spatk;
|
||||
|
||||
@FieldDescription("精灵的特防")
|
||||
public @UInt long spdef;
|
||||
|
||||
@FieldDescription("精灵的速度")
|
||||
public @UInt long speed;
|
||||
|
||||
@FieldDescription("填充字节")
|
||||
@ArraySerialize(value = ArraySerializeType.FIXED_LENGTH, fixedLength = 55)
|
||||
public byte[] reserved = new byte[55];
|
||||
}
|
||||
49
common/core/info/pet/UpdatePropInfo.java
Normal file
49
common/core/info/pet/UpdatePropInfo.java
Normal file
@@ -0,0 +1,49 @@
|
||||
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.AutoCodec;
|
||||
import org.nieo.seerproject.common.annotations.serialize.UInt;
|
||||
|
||||
@Data
|
||||
@AutoCodec
|
||||
@SuperBuilder
|
||||
public class UpdatePropInfo {
|
||||
@FieldDescription("精灵的捕获时间")
|
||||
private @UInt long catchTime;
|
||||
@FieldDescription("精灵id")
|
||||
private @UInt long id;
|
||||
@FieldDescription("精灵等级")
|
||||
private @UInt long level;
|
||||
@FieldDescription("已获得的总经验")
|
||||
private @UInt long exp;
|
||||
@FieldDescription("升到下一级所需总经验")
|
||||
private @UInt long currentLevelExp;
|
||||
@FieldDescription("到下一级升级所需的经验")
|
||||
private @UInt long nextLvExp;
|
||||
@FieldDescription("最大血量")
|
||||
private @UInt long maxHp;
|
||||
@FieldDescription("攻击")
|
||||
private @UInt long attack;
|
||||
@FieldDescription("防御")
|
||||
private @UInt long defence;
|
||||
@FieldDescription("特攻")
|
||||
private @UInt long sa;
|
||||
@FieldDescription("特防")
|
||||
private @UInt long sd;
|
||||
@FieldDescription("速度")
|
||||
private @UInt long sp;
|
||||
@FieldDescription("hp学习力")
|
||||
private @UInt long ev_hp;
|
||||
@FieldDescription("攻击学习力")
|
||||
private @UInt long ev_a;
|
||||
@FieldDescription("防御学习力")
|
||||
private @UInt long ev_d;
|
||||
@FieldDescription("特攻学习力")
|
||||
private @UInt long ev_sa;
|
||||
@FieldDescription("特防学习力")
|
||||
private @UInt long ev_sd;
|
||||
@FieldDescription("速度学习力")
|
||||
private @UInt long ev_sp;
|
||||
}
|
||||
21
common/core/info/pet/UpdateSkillInfo.java
Normal file
21
common/core/info/pet/UpdateSkillInfo.java
Normal file
@@ -0,0 +1,21 @@
|
||||
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.UInt;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@SuperBuilder
|
||||
@Data
|
||||
public class UpdateSkillInfo {
|
||||
@FieldDescription("精灵获得时间")
|
||||
private @UInt long petCatchTime;
|
||||
@FieldDescription("能直接放到精灵技能列表里的技能数量, 若没有剩余空闲技能格子则为0, 上限为3")
|
||||
private @UInt long activeSkillNum;
|
||||
@FieldDescription("填充格子后精灵还能学习的技能个数, 若学习技能数量小于剩余格子数则为0")
|
||||
private @UInt long unActiveSkillNum;
|
||||
@FieldDescription("精灵升级后新学习的技能id列表")
|
||||
private List<@UInt Integer> skillArray;
|
||||
}
|
||||
18
common/core/info/pet/UpdateSkillOutboundInfo.java
Normal file
18
common/core/info/pet/UpdateSkillOutboundInfo.java
Normal file
@@ -0,0 +1,18 @@
|
||||
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.OutboundMessageType;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
import org.nieo.seerproject.common.net.OutboundMessage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@OutboundMessageType(MessageCommandIDRegistry.Note_Update_Skill)
|
||||
public class UpdateSkillOutboundInfo implements OutboundMessage {
|
||||
@FieldDescription("更新技能数据")
|
||||
private List<UpdateSkillInfo> infoArray;
|
||||
}
|
||||
13
common/core/info/pet/bag/GetPetListInboundEmpty.java
Normal file
13
common/core/info/pet/bag/GetPetListInboundEmpty.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package org.nieo.seerproject.common.net.info.pet.bag;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.InboundMessageType;
|
||||
import org.nieo.seerproject.common.annotations.serialize.AutoCodec;
|
||||
import org.nieo.seerproject.common.net.InboundMessage;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
|
||||
@Data
|
||||
@AutoCodec
|
||||
@InboundMessageType(MessageCommandIDRegistry.Get_Pet_List)
|
||||
public class GetPetListInboundEmpty implements InboundMessage {
|
||||
}
|
||||
19
common/core/info/pet/bag/GetPetListOutboundInfo.java
Normal file
19
common/core/info/pet/bag/GetPetListOutboundInfo.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package org.nieo.seerproject.common.net.info.pet.bag;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.FieldDescription;
|
||||
import org.nieo.seerproject.common.annotations.OutboundMessageType;
|
||||
import org.nieo.seerproject.common.annotations.serialize.AutoCodec;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
import org.nieo.seerproject.common.net.OutboundMessage;
|
||||
import org.nieo.seerproject.common.net.info.pet.PetShortInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@AutoCodec
|
||||
@OutboundMessageType(MessageCommandIDRegistry.Get_Pet_List)
|
||||
public class GetPetListOutboundInfo implements OutboundMessage {
|
||||
@FieldDescription("精灵摘要信息列表")
|
||||
private List<PetShortInfo> petShortInfo;
|
||||
}
|
||||
17
common/core/info/pet/bag/PetDefaultInboundInfo.java
Normal file
17
common/core/info/pet/bag/PetDefaultInboundInfo.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package org.nieo.seerproject.common.net.info.pet.bag;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.FieldDescription;
|
||||
import org.nieo.seerproject.common.annotations.InboundMessageType;
|
||||
import org.nieo.seerproject.common.annotations.serialize.AutoCodec;
|
||||
import org.nieo.seerproject.common.annotations.serialize.UInt;
|
||||
import org.nieo.seerproject.common.net.InboundMessage;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
|
||||
@Data
|
||||
@AutoCodec
|
||||
@InboundMessageType(MessageCommandIDRegistry.Pet_Default)
|
||||
public class PetDefaultInboundInfo implements InboundMessage {
|
||||
@FieldDescription("精灵捕捉时间")
|
||||
private @UInt long catchTime;
|
||||
}
|
||||
17
common/core/info/pet/bag/PetDefaultOutboundInfo.java
Normal file
17
common/core/info/pet/bag/PetDefaultOutboundInfo.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package org.nieo.seerproject.common.net.info.pet.bag;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.FieldDescription;
|
||||
import org.nieo.seerproject.common.annotations.OutboundMessageType;
|
||||
import org.nieo.seerproject.common.annotations.serialize.AutoCodec;
|
||||
import org.nieo.seerproject.common.annotations.serialize.UInt;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
import org.nieo.seerproject.common.net.OutboundMessage;
|
||||
|
||||
@Data
|
||||
@AutoCodec
|
||||
@OutboundMessageType(MessageCommandIDRegistry.Pet_Default)
|
||||
public class PetDefaultOutboundInfo implements OutboundMessage {
|
||||
@FieldDescription("0: 首发设置失败,1: 首发设置成功")
|
||||
private @UInt long isDefault;
|
||||
}
|
||||
19
common/core/info/pet/bag/PetReleaseInboundInfo.java
Normal file
19
common/core/info/pet/bag/PetReleaseInboundInfo.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package org.nieo.seerproject.common.net.info.pet.bag;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.FieldDescription;
|
||||
import org.nieo.seerproject.common.annotations.InboundMessageType;
|
||||
import org.nieo.seerproject.common.annotations.serialize.AutoCodec;
|
||||
import org.nieo.seerproject.common.annotations.serialize.UInt;
|
||||
import org.nieo.seerproject.common.net.InboundMessage;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
|
||||
@AutoCodec
|
||||
@Data
|
||||
@InboundMessageType(MessageCommandIDRegistry.Pet_Release)
|
||||
public class PetReleaseInboundInfo implements InboundMessage {
|
||||
@FieldDescription("精灵生成时间")
|
||||
private @UInt long catchTime;
|
||||
@FieldDescription("0为放入仓库,1为放入背包")
|
||||
private @UInt long flag;
|
||||
}
|
||||
29
common/core/info/pet/bag/PetReleaseOutboundInfo.java
Normal file
29
common/core/info/pet/bag/PetReleaseOutboundInfo.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package org.nieo.seerproject.common.net.info.pet.bag;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.FieldDescription;
|
||||
import org.nieo.seerproject.common.annotations.OutboundMessageType;
|
||||
import org.nieo.seerproject.common.annotations.serialize.AutoCodec;
|
||||
import org.nieo.seerproject.common.annotations.serialize.UInt;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
import org.nieo.seerproject.common.net.OutboundMessage;
|
||||
import org.nieo.seerproject.common.net.info.pet.PetInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@AutoCodec
|
||||
@OutboundMessageType(MessageCommandIDRegistry.Pet_Release)
|
||||
public class PetReleaseOutboundInfo implements OutboundMessage {
|
||||
@FieldDescription("暂定0")
|
||||
private @UInt long homeEnergy;
|
||||
@FieldDescription("精灵生成时间")
|
||||
private @UInt long firstPetTime;
|
||||
// @FieldDescription("0为放入仓库,1为放入背包")
|
||||
// private @UInt long flag;
|
||||
// petInfo 最大长度应该为1
|
||||
// 当flag为0时,放回仓库;当flag为1时,放回背包
|
||||
// 即:List长度为0时,表示放回仓库;长度为1时,表示放回背包
|
||||
@FieldDescription("精灵信息")
|
||||
private List<PetInfo> petInfo;
|
||||
}
|
||||
21
common/core/info/pet/bag/PetRoweiInboundInfo.java
Normal file
21
common/core/info/pet/bag/PetRoweiInboundInfo.java
Normal file
@@ -0,0 +1,21 @@
|
||||
package org.nieo.seerproject.common.net.info.pet.bag;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.FieldDescription;
|
||||
import org.nieo.seerproject.common.annotations.InboundMessageType;
|
||||
import org.nieo.seerproject.common.annotations.serialize.AutoCodec;
|
||||
import org.nieo.seerproject.common.annotations.serialize.UInt;
|
||||
import org.nieo.seerproject.common.net.InboundMessage;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
|
||||
@Data
|
||||
@AutoCodec
|
||||
@InboundMessageType(MessageCommandIDRegistry.Pet_Rowei)
|
||||
public class PetRoweiInboundInfo implements InboundMessage {
|
||||
|
||||
@FieldDescription("精灵类型ID")
|
||||
private @UInt long typeId;
|
||||
|
||||
@FieldDescription("精灵捕捉时间")
|
||||
private @UInt long catchTime;
|
||||
}
|
||||
13
common/core/info/pet/bag/PetRoweiListInboundEmpty.java
Normal file
13
common/core/info/pet/bag/PetRoweiListInboundEmpty.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package org.nieo.seerproject.common.net.info.pet.bag;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.InboundMessageType;
|
||||
import org.nieo.seerproject.common.annotations.serialize.AutoCodec;
|
||||
import org.nieo.seerproject.common.net.InboundMessage;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
|
||||
@Data
|
||||
@AutoCodec
|
||||
@InboundMessageType(MessageCommandIDRegistry.Pet_Rowei_List)
|
||||
public class PetRoweiListInboundEmpty implements InboundMessage {
|
||||
}
|
||||
19
common/core/info/pet/bag/PetRoweiListOutboundInfo.java
Normal file
19
common/core/info/pet/bag/PetRoweiListOutboundInfo.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package org.nieo.seerproject.common.net.info.pet.bag;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.FieldDescription;
|
||||
import org.nieo.seerproject.common.annotations.OutboundMessageType;
|
||||
import org.nieo.seerproject.common.annotations.serialize.AutoCodec;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
import org.nieo.seerproject.common.net.OutboundMessage;
|
||||
import org.nieo.seerproject.common.net.info.pet.PetShortInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@AutoCodec
|
||||
@OutboundMessageType(MessageCommandIDRegistry.Pet_Rowei_List)
|
||||
public class PetRoweiListOutboundInfo implements OutboundMessage {
|
||||
@FieldDescription("精灵摘要信息列表")
|
||||
private List<PetShortInfo> petShortInfo;
|
||||
}
|
||||
13
common/core/info/pet/bag/PetRoweiOutboundEmpty.java
Normal file
13
common/core/info/pet/bag/PetRoweiOutboundEmpty.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package org.nieo.seerproject.common.net.info.pet.bag;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.OutboundMessageType;
|
||||
import org.nieo.seerproject.common.annotations.serialize.AutoCodec;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
import org.nieo.seerproject.common.net.OutboundMessage;
|
||||
|
||||
@Data
|
||||
@AutoCodec
|
||||
@OutboundMessageType(MessageCommandIDRegistry.Pet_Rowei)
|
||||
public class PetRoweiOutboundEmpty implements OutboundMessage {
|
||||
}
|
||||
19
common/core/info/pet/skill/ChangeSkillInfo.java
Normal file
19
common/core/info/pet/skill/ChangeSkillInfo.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package org.nieo.seerproject.common.net.info.pet.skill;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.FieldDescription;
|
||||
import org.nieo.seerproject.common.annotations.serialize.UInt;
|
||||
|
||||
@Data
|
||||
public class ChangeSkillInfo {
|
||||
@FieldDescription("精灵生成时间")
|
||||
private @UInt long catchTime;
|
||||
@FieldDescription("填充字段,默认为1")
|
||||
private @UInt long reserved;
|
||||
@FieldDescription("填充字段,默认为1")
|
||||
private @UInt long reserved1;
|
||||
@FieldDescription("拥有的技能id")
|
||||
private @UInt long hasSkill;
|
||||
@FieldDescription("替换技能的id")
|
||||
private @UInt long replaceSkill;
|
||||
}
|
||||
@@ -1,15 +1,11 @@
|
||||
package skill
|
||||
|
||||
// SkillInfo 技能信息结构体
|
||||
// SkillInfo 技能基础信息
|
||||
type SkillInfo struct {
|
||||
ID uint32 // 技能id
|
||||
PP uint32 // 剩余pp
|
||||
}
|
||||
|
||||
// NewSkillInfo 创建一个新的技能信息实例
|
||||
func NewSkillInfo(id, pp uint32) *SkillInfo {
|
||||
return &SkillInfo{
|
||||
ID: id,
|
||||
PP: pp,
|
||||
}
|
||||
// SkillId 技能ID
|
||||
SkillId uint32 `json:"skillId"`
|
||||
// Level 技能等级
|
||||
Level uint32 `json:"level"`
|
||||
// Pp 技能PP值
|
||||
Pp uint32 `json:"pp"`
|
||||
}
|
||||
|
||||
16
common/core/info/pet/skill/SkillInfo.java
Normal file
16
common/core/info/pet/skill/SkillInfo.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package org.nieo.seerproject.common.net.info.pet.skill;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.nieo.seerproject.common.annotations.serialize.UInt;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SkillInfo {
|
||||
public @UInt long id; //技能id
|
||||
public @UInt long pp; //剩余pp
|
||||
}
|
||||
14
common/core/info/pet/soulBead/GetSoulBeadInboundInfo.java
Normal file
14
common/core/info/pet/soulBead/GetSoulBeadInboundInfo.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package org.nieo.seerproject.common.net.info.pet.soulBead;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.InboundMessageType;
|
||||
import org.nieo.seerproject.common.net.InboundMessage;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
@Data
|
||||
@InboundMessageType(MessageCommandIDRegistry.Get_Soul_Bead_List)
|
||||
public class GetSoulBeadInboundInfo implements InboundMessage {
|
||||
public static final @Nonnull GetSoulBeadInboundInfo INSTANCE = new GetSoulBeadInboundInfo();
|
||||
}
|
||||
17
common/core/info/pet/soulBead/GetSoulBeadOutboundInfo.java
Normal file
17
common/core/info/pet/soulBead/GetSoulBeadOutboundInfo.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package org.nieo.seerproject.common.net.info.pet.soulBead;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.FieldDescription;
|
||||
import org.nieo.seerproject.common.annotations.OutboundMessageType;
|
||||
import org.nieo.seerproject.common.net.MessageCommandIDRegistry;
|
||||
import org.nieo.seerproject.common.net.OutboundMessage;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@OutboundMessageType(MessageCommandIDRegistry.Get_Soul_Bead_List)
|
||||
public class GetSoulBeadOutboundInfo implements OutboundMessage {
|
||||
@FieldDescription("元神珠信息")
|
||||
private List<SoulBeadItemInfo> soulBeadList = new ArrayList<>();
|
||||
}
|
||||
14
common/core/info/pet/soulBead/SoulBeadItemInfo.java
Normal file
14
common/core/info/pet/soulBead/SoulBeadItemInfo.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package org.nieo.seerproject.common.net.info.pet.soulBead;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nieo.seerproject.common.annotations.FieldDescription;
|
||||
import org.nieo.seerproject.common.annotations.serialize.UInt;
|
||||
|
||||
@Data
|
||||
@FieldDescription("元神珠信息")
|
||||
public class SoulBeadItemInfo {
|
||||
@FieldDescription("获得时间")
|
||||
private @UInt long obtainTime;
|
||||
@FieldDescription("物品ID")
|
||||
private @UInt long itemId;
|
||||
}
|
||||
Reference in New Issue
Block a user