fix: 修复空提交问题

This commit is contained in:
1
2025-11-16 21:54:18 +00:00
parent 0bc7db4177
commit 8ee5508974
3 changed files with 5 additions and 2 deletions

View File

@@ -105,7 +105,7 @@ func (h Controller) PlayerFightBoss(data *fight.ChallengeBossInboundInfo, c *pla
})
fight.NewFight(c, ai, func(foi *info.FightOverInfo) {
c.Done.Done(model.MilestoneMode.BOSS, data.BossId)
c.Done.Exec(model.MilestoneMode.BOSS, []uint32{data.BossId})
})

View File

@@ -45,7 +45,7 @@ func (d *Done) SPT(mapid, bossid, count uint32, fn func()) {
}
// 分发事件 ,指定事件+1 并触发是否完成
func (d *Done) Done(Donetype model.EnumMilestone, id []uint32) {
func (d *Done) Exec(Donetype model.EnumMilestone, id []uint32) {
d.Service.Done.Exec(Donetype, id, func(t *model.MilestoneEX) bool {

View File

@@ -96,6 +96,9 @@ func (p *Player) CanFight() bool {
return false
}
if p.GetSpace().ARENA.ChallengerID == p.Info.UserID || p.GetSpace().ARENA.Id == p.Info.UserID {
return false
}
for _, v := range p.Info.PetList {
if v.Hp > 0 { // 只要找到一个血量大于0的宠物就可以战斗
return true