feat(player): 重构任务状态管理逻辑
将任务状态相关的 GetTask 和 SetTask 方法从 player 包迁移至 model.PlayerInfo 结构体中, 统一通过 c.Info 调
This commit is contained in:
@@ -121,9 +121,8 @@ func (h Controller) PlayerFightBoss(data *fight.ChallengeBossInboundInfo, c *pla
|
||||
fight.NewFight(c, ai, func(foi *info.FightOverInfo) {
|
||||
if taskid != 0 {
|
||||
if foi.Reason == 0 && foi.WinnerId == c.Info.UserID {
|
||||
if c.GetTask(taskid) == player.Unaccepted {
|
||||
c.SetTask(taskid, player.Completed) //设置完成任务
|
||||
c.Info.TaskList[taskid-1] = 3
|
||||
if c.Info.GetTask(taskid) == model.Unaccepted {
|
||||
c.Info.SetTask(taskid, model.Completed) //设置完成任务
|
||||
|
||||
moinfo.PetList[0].Downgrade(1)
|
||||
PetID := moinfo.PetList[0].ID
|
||||
|
||||
Reference in New Issue
Block a user