Files
bl/logic/service/pet/pet.go
昔念 4b5c6ce129 refactor(logic): 重构战斗相关逻辑和数据结构
- 优化了 FightPetInfo 和 AttackValue 结构体,使用更合理的数据类型
- 重新定义了战斗流程中的各种消息结构体
- 改进了宠物信息生成和计算逻辑
- 重构了宠物相关服务和控制器方法
- 优化了数据库操作,提高了代码的可读性和维护性
2025-09-01 01:03:46 +08:00

32 lines
1023 B
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 pet
import (
"blazing/common/socket/handler"
"blazing/modules/blazing/model"
)
type InInfo struct {
Head handler.TomeeHeader `cmd:"2301" struc:"[0]pad"`
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 handler.TomeeHeader `cmd:"2304" struc:"[0]pad"`
CatchTime uint32 `json:"catch_time" fieldDescription:"精灵生成时间" autoCodec:"true" uint:"true"`
Flag uint32 `json:"flag" fieldDescription:"0为放入仓库1为放入背包" autoCodec:"true" uint:"true"`
}