100 lines
4.1 KiB
Go
100 lines
4.1 KiB
Go
package pet
|
||
|
||
import (
|
||
"blazing/common/data"
|
||
"blazing/logic/service/common"
|
||
"blazing/modules/blazing/model"
|
||
)
|
||
|
||
type InInfo struct {
|
||
Head common.TomeeHeader `cmd:"2301" struc:"skip"`
|
||
|
||
CatchTime uint32
|
||
}
|
||
|
||
type OutInfo struct {
|
||
model.PetInfo
|
||
}
|
||
|
||
// PetReleaseOutboundInfo 宠物释放出站消息
|
||
type PetReleaseOutboundInfo struct {
|
||
HomeEnergy uint32 `json:"home_energy" fieldDescription:"暂定0" autoCodec:"true" uint:"true"`
|
||
FirstPetTime uint32 `json:"first_pet_time" fieldDescription:"精灵生成时间" autoCodec:"true" uint:"true"`
|
||
Flag uint32
|
||
PetInfo model.PetInfo `json:"pet_info" fieldDescription:"精灵信息" autoCodec:"true"`
|
||
}
|
||
|
||
// 放入背包或者加入仓库
|
||
type PetReleaseInboundInfo struct {
|
||
Head common.TomeeHeader `cmd:"2304" struc:"skip"`
|
||
CatchTime uint32 `json:"catch_time" fieldDescription:"精灵生成时间" autoCodec:"true" uint:"true"`
|
||
Flag uint32 `json:"flag" fieldDescription:"0为放入仓库,1为放入背包" autoCodec:"true" uint:"true"`
|
||
}
|
||
|
||
type PetShowInboundInfo struct {
|
||
Head common.TomeeHeader `cmd:"2305" struc:"skip"`
|
||
|
||
CatchTime uint32 `codec:"catchTime" inboundMessageType:"Pet_Show"`
|
||
Flag uint32 `codec:"flag"`
|
||
}
|
||
|
||
type PetShowOutboundInfo struct {
|
||
UserID uint32 `codec:"UserID" description:"米米号"`
|
||
CatchTime uint32 `codec:"CatchTime" description:"精灵获得的时间"`
|
||
ID uint32 `codec:"PetID" description:"精灵编号"`
|
||
Flag uint32 `codec:"flag" description:"1为显示 0为收回"`
|
||
Dv uint32 `codec:"dv" description:"个体"`
|
||
// 是否闪光(@UInt long → uint32,0=否,1=是)
|
||
ShinyLen uint32 `json:"-" struc:"sizeof=ShinyInfo"`
|
||
ShinyInfo []data.GlowFilter `json:"ShinyInfo,omitempty"`
|
||
SkinID uint32 `codec:"skinID" description:"皮肤ID"`
|
||
Reserved1 [3]uint32
|
||
}
|
||
type PetOneCureInboundInfo struct {
|
||
Head common.TomeeHeader `cmd:"2310" struc:"skip"`
|
||
CatchTime uint32 `json:"catchTime" fieldDescription:"精灵捕捉时间" uint:"true"`
|
||
} // PetOneCureOutboundInfo 宠物单个治疗出站消息
|
||
type PetOneCureOutboundInfo struct {
|
||
CatchTime uint32 `json:"catchTime" fieldDescription:"精灵捕捉时间" uint:"true"`
|
||
}
|
||
|
||
type PET_ROWEI struct {
|
||
Head common.TomeeHeader `cmd:"2321" struc:"skip"`
|
||
ID uint32
|
||
CatchTime uint32 `json:"catchTime" fieldDescription:"精灵捕捉时间" uint:"true"`
|
||
}
|
||
type PET_RETRIEVE struct {
|
||
Head common.TomeeHeader `cmd:"2322" struc:"skip"`
|
||
//ID uint32
|
||
CatchTime uint32 `json:"catchTime" fieldDescription:"精灵捕捉时间" uint:"true"`
|
||
}
|
||
|
||
// PetDefaultInboundInfo
|
||
// 实现了InboundMessage接口
|
||
type PetDefaultInboundInfo struct {
|
||
Head common.TomeeHeader `cmd:"2308" struc:"skip"`
|
||
CatchTime uint32 `json:"catchTime" fieldDescription:"精灵捕捉时间" uint:"true" autoCodec:"true" inboundMessageType:"Pet_Default"`
|
||
}
|
||
|
||
// PetDefaultOutboundInfo
|
||
// 实现了OutboundMessage接口
|
||
type PetDefaultOutboundInfo struct {
|
||
IsDefault uint32 `json:"isDefault" fieldDescription:"0: 首发设置失败,1: 首发设置成功" uint:"true" autoCodec:"true" outboundMessageType:"Pet_Default"`
|
||
}
|
||
|
||
// C2S_IS_COLLECT 前端(Client)→后端(Server):精灵收集任务状态查询请求包
|
||
type C2S_IS_COLLECT struct {
|
||
Head common.TomeeHeader `cmd:"2313" struc:"skip"`
|
||
Type uint32 `json:"type" msgpack:"type"` // 收集类型:301=太空站10胜;1=精灵收集计划一期第一种;2=精灵收集计划一期第二种
|
||
}
|
||
|
||
// S2C_IS_COLLECT 后端(Server)→前端(Client):精灵收集任务状态查询回包
|
||
// 补充说明:
|
||
// 1. 此包同时适用于「精灵收集计划」和「太空站10胜送主宠」场景
|
||
// 2. isCom=0(未领取)时,才可调用 PRIZE_OF_PETKING(2317) 协议领取精灵
|
||
// 3. isCom=1(已完成/已领取)时,代表奖励已领取,无需再调用领取协议
|
||
type S2C_IS_COLLECT struct {
|
||
ID uint32 `json:"id" msgpack:"id"` // 收集类型:301=太空站10胜;1=精灵收集计划一期第一种;2=精灵收集计划一期第二种
|
||
IsCom uint32 `json:"isCom" msgpack:"isCom"` // 是否完成/是否已领取:0=未完成/未领取;1=已完成/已领取
|
||
}
|