fix: 修复空提交问题

This commit is contained in:
1
2025-11-18 22:16:55 +00:00
parent f164d3c358
commit 6831861e0d
15 changed files with 92 additions and 67 deletions

View File

@@ -5,12 +5,14 @@ import (
"blazing/logic/service/fight/info"
"blazing/modules/blazing/model"
"math/rand"
"sync/atomic"
"time"
)
type baseplayer struct {
Info *model.PlayerInfo
FightC common.FightI //绑定战斗标识 替代本身的是否战斗标记 //IsFighting bool
Info *model.PlayerInfo
canFight uint32
FightC common.FightI //绑定战斗标识 替代本身的是否战斗标记 //IsFighting bool
*info.PlayerCaptureContext
}
@@ -32,9 +34,13 @@ func (p *baseplayer) GetInfo() *model.PlayerInfo {
return p.Info
}
func (f *baseplayer) SetFightC(ff common.FightI) {
f.FightC = ff
}
func (f *baseplayer) QuitFight() {
//将战斗标记设置为0 这里的标记是
atomic.StoreUint32(&f.canFight, 0)
}
func (f *baseplayer) GetPlayerCaptureContext() *info.PlayerCaptureContext {
return f.PlayerCaptureContext
}