```
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

feat(xmlres): 使用rawFlexibleString替换字符串类型以支持灵活解析

- 将EffectArg结构体中的SideEffectArg字段类型从string改为rawFlexibleString
- 将Move结构体中的Name字段类型从string改为rawFlexibleString,并更新反序列化逻辑
- 统一配置文件解析方式,移除磁盘回退机制并简化readConfigContent函数
- 移除不再使用的导入包和变量

fix(fight): 修复战斗系统中的空技能和无效数据问题

- 在
This commit is contained in:
昔念
2026-04-13 11:28:30 +08:00
parent eca7dd86e1
commit 3739c2a6f9
8 changed files with 253 additions and 252 deletions

View File

@@ -184,6 +184,9 @@ func (f *FightC) collectAttackValues(inputs []*input.Input) []model.AttackValue
continue
}
attackValue := *fighter.AttackValue
if attackValue.SkillID == 0 {
continue
}
attackValue.ActorIndex = uint32(actorIndex)
values = append(values, attackValue)
}
@@ -462,11 +465,13 @@ func (f *FightC) enterturn(firstAttack, secondAttack *action.SelectSkillAction)
// })
return
}
f.BroadcastPlayers(func(p common.PlayerI) {
if !f.LegacyGroupProtocol {
f.sendFightPacket(p, fightPacketSkillResult, &attackValueResult)
}
})
if len(attackValueResult.FirstAttackInfo) > 0 || len(attackValueResult.SecondAttackInfo) > 0 {
f.BroadcastPlayers(func(p common.PlayerI) {
if !f.LegacyGroupProtocol {
f.sendFightPacket(p, fightPacketSkillResult, &attackValueResult)
}
})
}
f.Broadcast(func(fighter *input.Input) {
fighter.CanChange = 0
})

View File

@@ -484,13 +484,6 @@ func initfightready(in *input.Input) (model.FightUserInfo, []model.ReadyFightPet
if err != nil {
panic(err)
}
if i == 0 && in.CanCapture > 0 {
if in.CanCapture > 255 {
t[i].IsCapture = 255
} else {
t[i].IsCapture = uint8(in.CanCapture)
}
}
}
return userindo, t