refactor(login): 重构登录重置逻辑,使用 defer 替代 goroutine

将每日任务重置逻辑从 goroutine 改为 defer 执行,确保在函数结束时正确重置任务状态。
同时将 TaskInfo 中的 Info 字段重命名为 Data,保持结构一致性。

refactor(task): 统一任务数据字段名为 Data

将 task 相关结构体中的 Info 字段统一
This commit is contained in:
2025-09-23 13:24:40 +08:00
parent 1ee43e1319
commit ea1148039e
10 changed files with 56 additions and 49 deletions

View File

@@ -28,7 +28,7 @@ type Input struct {
func NewInput(c common.FightI, p common.PlayerI) *Input {
ret := &Input{FightC: c, Player: p}
t := NodeM[1000000]
t, _ := ret.GetDamageEffect(1)
ret.AddEffect(deepcopy.Copy(t).(Effect)) //添加默认基类,实现继承
p.SetFightC(c) //给玩家设置战斗容器
return ret