feat(xmlres): 使用rawFlexibleString替换字符串类型以支持灵活解析 - 将EffectArg结构体中的SideEffectArg字段类型从string改为rawFlexibleString - 将Move结构体中的Name字段类型从string改为rawFlexibleString,并更新反序列化逻辑 - 统一配置文件解析方式,移除磁盘回退机制并简化readConfigContent函数 - 移除不再使用的导入包和变量 fix(fight): 修复战斗系统中的空技能和无效数据问题 - 在collectAttackValues函数中过滤掉SkillID为0的攻击值 - 添加检查避免发送空的攻击信息到客户端 - 移除输入模块中未使用的捕捉逻辑 refactor(middleware): 重构中间件配置并添加CDK权限控制 - 简化middleware.go文件结构 - 为CDK相关接口添加适当的权限中间件 - 优化服务器代理配置 feat(player): 移除宠物捕捉状态字段 - 从ReadyFightPetInfo结构体中移除IsCapture字段 - 简化宠物准备信息的数据结构 ```
This commit is contained in:
@@ -370,7 +370,7 @@ func (f *FightC) collectFightPetInfos(inputs []*input.Input) []info.FightPetInfo
|
||||
Hp: currentPet.Info.Hp,
|
||||
MaxHp: currentPet.Info.MaxHp,
|
||||
Level: currentPet.Info.Level,
|
||||
Catchable: uint32(fighter.CanCapture),
|
||||
Catchable: fightPetCatchableFlag(fighter.CanCapture),
|
||||
}
|
||||
if fighter.AttackValue != nil {
|
||||
fightInfo.Prop = fighter.AttackValue.Prop
|
||||
@@ -380,6 +380,13 @@ func (f *FightC) collectFightPetInfos(inputs []*input.Input) []info.FightPetInfo
|
||||
return infos
|
||||
}
|
||||
|
||||
func fightPetCatchableFlag(catchRate int) uint32 {
|
||||
if catchRate > 0 {
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// checkBothPlayersReady 检查PVP战斗中双方是否都已准备完成
|
||||
// 参数c为当前准备的玩家,返回true表示双方均准备完成
|
||||
func (f *FightC) checkBothPlayersReady(currentPlayer common.PlayerI) bool {
|
||||
|
||||
Reference in New Issue
Block a user