Files
bl/logic/service/pet/skill.go
昔念 82bb99d141 ```
refactor(common/rpc): 移除Redis PubSub心跳机制并优化连接管理

移除Redis PubSub连接的心跳保活功能,因为PubSub连接只应负责订阅和接收,
避免在同一连接上并发执行PING操作。更新了ListenFunc和ListenFight函数,
统一代码结构,移除了context包依赖,并添加了相关注释说明。

feat(logic/pet): 新增宠物技能提交功能

新增CommitPetSkills接口用于一次性提交宠物技能学习/替换/排序结果。
实现技能验证、费用计算和状态更新逻辑,包括新技能学习成本和排序费用。
添加isSameUint32Slice辅助函数用于比较技能数组。
```
2026-04-12 19:14:18 +08:00

32 lines
1.1 KiB
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/logic/service/common"
// ChangeSkillInfo 技能变更信息
type ChangeSkillInfo struct {
Head common.TomeeHeader `cmd:"2312" struc:"skip"`
CatchTime uint32 `json:"catchTime"` // 精灵生成时间
Reserved uint32 `json:"reserved"` // 填充字段默认为1
Reserved1 uint32 `json:"reserved1"` // 填充字段默认为1
HasSkill uint32 `json:"hasSkill"` // 拥有的技能id
ReplaceSkill uint32 `json:"replaceSkill"` // 替换技能的id
}
// ChangeSkillInfo 技能变更信息
type ChangeSkillOutInfo struct {
CatchTime uint32 `json:"catchTime"` // 精灵生成时间
}
type C2S_Skill_Sort struct {
Head common.TomeeHeader `cmd:"2328" struc:"skip"`
CapTm uint32 `json:"capTm"` // 精灵的捕捉时间对应C# uint capTm
Skill [4]uint32 `json:"skill_1"` // 技能1对应C# uint skill_1
}
type CommitPetSkillsInfo struct {
Head common.TomeeHeader `cmd:"52313" struc:"skip"`
CatchTime uint32 `json:"catchTime"`
Skill [4]uint32 `json:"skill"`
}