2025-09-01 01:03:46 +08:00
|
|
|
|
package pet
|
|
|
|
|
|
|
2025-12-13 23:52:16 +08:00
|
|
|
|
import (
|
2025-12-21 17:18:33 +00:00
|
|
|
|
"blazing/common/data"
|
2025-12-13 23:52:16 +08:00
|
|
|
|
"blazing/logic/service/common"
|
2026-01-19 18:51:56 +08:00
|
|
|
|
"blazing/modules/player/model"
|
2025-12-13 23:52:16 +08:00
|
|
|
|
)
|
2025-09-01 01:03:46 +08:00
|
|
|
|
|
|
|
|
|
|
type GetPetListInboundEmpty struct {
|
2025-11-24 11:56:20 +08:00
|
|
|
|
Head common.TomeeHeader `cmd:"2303" struc:"skip"`
|
|
|
|
|
|
}
|
|
|
|
|
|
type GetPetListFreeInboundEmpty struct {
|
|
|
|
|
|
Head common.TomeeHeader `cmd:"2320" struc:"skip"`
|
2025-09-01 01:03:46 +08:00
|
|
|
|
}
|
|
|
|
|
|
type GetPetListOutboundInfo struct {
|
|
|
|
|
|
ShortInfoListLen uint32 `struc:"int32,sizeof=ShortInfoList"`
|
|
|
|
|
|
ShortInfoList []PetShortInfo
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// PetShortInfo 精灵简要信息结构体
|
|
|
|
|
|
type PetShortInfo struct {
|
2025-09-21 08:07:17 +00:00
|
|
|
|
ID uint32 // 精灵类型ID(
|
2025-09-01 01:03:46 +08:00
|
|
|
|
CatchTime uint32 // 精灵生成时间
|
2025-09-01 01:31:42 +08:00
|
|
|
|
Level uint32 // 精灵等级
|
|
|
|
|
|
SkinID uint32 // 精灵皮肤ID
|
2025-12-14 05:34:39 +08:00
|
|
|
|
// 是否闪光(@UInt long → uint32,0=否,1=是)
|
2025-12-21 17:18:33 +00:00
|
|
|
|
ShinyLen uint32 `json:"-" struc:"sizeof=ShinyInfo"`
|
|
|
|
|
|
ShinyInfo []data.GlowFilter `json:"ShinyInfo,omitempty"`
|
2025-09-01 01:03:46 +08:00
|
|
|
|
}
|
2025-11-26 01:33:48 +08:00
|
|
|
|
|
|
|
|
|
|
// C2S_PetFusion 前端(Client)到后端(Server)的精灵融合请求包
|
|
|
|
|
|
type C2S_PetFusion struct {
|
|
|
|
|
|
Head common.TomeeHeader `cmd:"2351" struc:"skip"`
|
|
|
|
|
|
Mcatchtime uint32 `json:"mcatchtime" msgpack:"mcatchtime"` // 主精灵的时间戳
|
|
|
|
|
|
Auxcatchtime uint32 `json:"auxcatchtime" msgpack:"auxcatchtime"` // 副精灵的时间戳
|
2025-12-02 03:59:28 +08:00
|
|
|
|
Item1 [4]uint32 `json:"item1" msgpack:"item1"` // 物品序号1
|
|
|
|
|
|
|
2026-01-03 01:35:32 +08:00
|
|
|
|
GoldItem1 [2]uint32 `json:"gold_item1" msgpack:"gold_item1"` // 0代表未放置 金豆物品1(C#:gold_item1)
|
|
|
|
|
|
|
2025-11-26 01:33:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// PetFusionInfo 精灵融合结果详情(后端回包嵌套结构体)
|
|
|
|
|
|
type PetFusionInfo struct {
|
|
|
|
|
|
ObtainTime uint32 `json:"obtainTime" msgpack:"obtainTime"` // 如果获得时间为0 则代表融合失败
|
|
|
|
|
|
SoulID uint32 `json:"soulID" msgpack:"soulID"` // 元神珠的id 融合失败为0
|
|
|
|
|
|
StarterCpTm uint32 `json:"starterCpTm" msgpack:"starterCpTm"` // 融合失败为0
|
|
|
|
|
|
CostItemFlag uint32 `json:"costItemFlag" msgpack:"costItemFlag"` // 是不是消耗掉了金豆道具 1代表消耗道具
|
|
|
|
|
|
}
|
2025-12-13 23:52:16 +08:00
|
|
|
|
type RoomPetInfo struct {
|
|
|
|
|
|
OwnerId uint32
|
|
|
|
|
|
CatchTime uint32
|
|
|
|
|
|
ID uint32 `fieldDesc:"精灵编号" `
|
|
|
|
|
|
Nature uint32 `fieldDesc:"性格" `
|
|
|
|
|
|
|
|
|
|
|
|
// 等级(@UInt long → uint32)
|
|
|
|
|
|
Level uint32 `fieldDesc:"等级" `
|
|
|
|
|
|
// 当前生命(@UInt long → uint32)
|
|
|
|
|
|
Hp uint32
|
|
|
|
|
|
// * battle_lv: atk(0), def(1), sp_atk(2), sp_def(3), spd(4), accuracy(5)
|
|
|
|
|
|
Prop [5]uint32 `fieldDesc:"属性" `
|
|
|
|
|
|
SkillListLen uint32 `struc:"sizeof=SkillList"`
|
|
|
|
|
|
|
|
|
|
|
|
// 技能信息:固定4条,空则赋值0(固定长度List → [4]SkillInfo,零值即符合“赋值0”)
|
|
|
|
|
|
SkillList []model.SkillInfo
|
|
|
|
|
|
// * ev:生命学习力,攻击学习力,防御学习力,特攻学习力,特防学习力,速度学习力
|
|
|
|
|
|
Ev [6]uint32 `fieldDesc:"属性" `
|
|
|
|
|
|
EffectInfoLen uint16 `struc:"sizeof=EffectInfo"`
|
|
|
|
|
|
// 特性列表:长度用UShort存储(变长List → []PetEffectInfo + 长度前缀规则) 第一个一定是特性
|
|
|
|
|
|
EffectInfo []model.PetEffectInfo `fieldDesc:"特性列表, 长度在头部以UShort存储" serialize:"lengthFirst,lengthType=uint16,type=structArray"`
|
|
|
|
|
|
}
|