refactor(fight): 重构战斗系统

- 移除 Player 结构中的 IsFighting 字段,使用 FightID 替代
- 优化 Move 结构,重新排序字段并添加注释
- 修改 EffectNode 和相关结构,统一使用 Ctx 字段名称
- 重构 Battle 和 BattlePetEntity 结构,简化属性并优化布局
- 更新战斗逻辑,调整效果应用和回合处理机制
This commit is contained in:
2025-09-03 00:37:05 +08:00
parent 39893e4df9
commit c42e392efe
9 changed files with 65 additions and 50 deletions

View File

@@ -57,15 +57,15 @@ type Player struct {
IsLogin bool //是否登录
mu sync.Mutex
loginChan chan struct{} // 登录完成通知通道
Info *model.PlayerInfo
StopChan chan struct{} //停止刷怪协程
IsFighting bool
loginChan chan struct{} // 登录完成通知通道
Info *model.PlayerInfo
StopChan chan struct{} //停止刷怪协程
context.Context
Playerinvite uint32 //当前邀请的玩家ID
Onlinetime uint32 //当前登录时间
OgreInfo *OgreInfo
FightID string //绑定战斗标识
FightID string //绑定战斗标识 替代本身的是否战斗标记 //IsFighting bool
//FightInfo info.NoteReadyToFightInfo
}