104 lines
3.9 KiB
Go
104 lines
3.9 KiB
Go
package pet
|
||
|
||
import (
|
||
"blazing/common/data"
|
||
"blazing/logic/service/common"
|
||
"blazing/modules/player/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
|
||
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"`
|
||
}
|
||
|
||
type C2S_NONO_EXE_LIST struct {
|
||
Head common.TomeeHeader `cmd:"9015" struc:"skip"`
|
||
}
|
||
|
||
// S2C_NONO_EXE_LIST 对应C#的同名结构体
|
||
type S2C_NONO_EXE_LIST struct {
|
||
// Exelist 对应C#的List<ExeingPetInfo>,Go中用切片([])替代列表
|
||
ExelistLen uint32 `json:"exelistLen" struc:"sizeof=Exelist"`
|
||
Exelist []ExeingPetInfo `json:"exelist"` // 若需JSON序列化,保留原字段名
|
||
}
|
||
|
||
// ExeingPetInfo 对应C#的同名结构体,存储精灵训练相关信息
|
||
type ExeingPetInfo struct {
|
||
Flag uint32 `json:"_flag"` // 应该是精灵是否在训练?(对应原_flag)
|
||
CapTm uint32 `json:"_capTm"` // 精灵的捕捉时间(对应原_capTm)
|
||
PetId uint32 `json:"_petId"` // 训练精灵的id(对应原_petId)
|
||
RemainDay uint32 `json:"_remainDay"` // 停留天数?前端用这个值除以3600,疑似时间戳(对应原_remainDay)
|
||
Course uint32 `json:"_course"` // 课程(对应原_course)
|
||
}
|