refactor(logic): 重构玩家战斗状态逻辑
- 移除玩家对象上的 IsFighting 标志 - 使用 FightID 字段来表示玩家是否处于战斗状态 - 更新相关控制器中的战斗状态检查逻辑 - 删除 BattleInputSourceEntity 中的冗余代码
This commit is contained in:
@@ -18,7 +18,7 @@ func (u *BattleInputSourceEntity) NewBattlePetEntity(ctx context.Context) {
|
||||
|
||||
ret := BattlePetEntity{}
|
||||
|
||||
ret.UnitAttributes = make(map[EnumAttrType]*Attribute)
|
||||
//ret.UnitAttributes = make(map[EnumAttrType]*Attribute)
|
||||
//todo 待实现精灵特性+加成的封装
|
||||
ctx = context.WithValue(ctx, Input_ctx, &ret) //添加用户到上下文
|
||||
ret.ctx = ctx
|
||||
|
||||
Reference in New Issue
Block a user