diff --git a/src/HttpServer/jsonconf/AchievementConfig.json b/src/HttpServer/jsonconf/AchievementConfig.json index 89d29e8..569c29d 100644 --- a/src/HttpServer/jsonconf/AchievementConfig.json +++ b/src/HttpServer/jsonconf/AchievementConfig.json @@ -224,7 +224,7 @@ "is_video": 1 }, { - "type": 4, + "type": 3, "id": 29, "desc": "累计观看视频360次", "aim": 360, @@ -232,7 +232,7 @@ "is_video": 1 }, { - "type": 4, + "type": 3, "id": 30, "desc": "累计观看视频400次", "aim": 400, diff --git a/src/HttpServer/logic/constdef.go b/src/HttpServer/logic/constdef.go index bbe3843..23691a0 100644 --- a/src/HttpServer/logic/constdef.go +++ b/src/HttpServer/logic/constdef.go @@ -12,6 +12,7 @@ const ( TASKTYPE_USEITEMTIMES = 8 //8表示使用道具次数 ACHIEVE_KILLLINE = 9 //表示消除行数 ACHIEVE_KILLLINELIE = 10 //表示消除列数 + ACHIEVE_GETSCORE = 11 //表示累计得到分数 ) diff --git a/src/HttpServer/logic/datadef.go b/src/HttpServer/logic/datadef.go index 80d1164..7421ef5 100644 --- a/src/HttpServer/logic/datadef.go +++ b/src/HttpServer/logic/datadef.go @@ -452,9 +452,10 @@ type TaskInfo struct { // type AchieveMentInfo struct { - WatchAdsCnt int //观看视频数 - KillStar int //消除行数 - KillStarLie int //消除列数 + WatchAdsCnt int //观看视频数 + KillStar int //消除行数 + KillStarLie int //消除列数 + SumGetScore int64 //累计获得分数 //SumGetGuan int //存钱罐累计提取 //SumUseItemCnt int //使用道具次数累计 } diff --git a/src/HttpServer/logic/function.go b/src/HttpServer/logic/function.go index 9fad13a..45a8693 100644 --- a/src/HttpServer/logic/function.go +++ b/src/HttpServer/logic/function.go @@ -94,7 +94,7 @@ func (uinfo *UserData) CalcAchieveList(list *TaskList, uniqueid string) *TaskLis if val.Taskstatus == 1 { switch cfg.Type { case ACHIEVETYPE_GETSCORE: - if uinfo.HighScore >= int64(cfg.Aim) { + if uinfo.Achieve.SumGetScore >= int64(cfg.Aim) { list.Taskdata[k].Taskstatus = 2 } case ACHIEVETYPE_LOGINDAY: diff --git a/src/HttpServer/logic/logic.go b/src/HttpServer/logic/logic.go index c3dd6d5..6a0bf98 100644 --- a/src/HttpServer/logic/logic.go +++ b/src/HttpServer/logic/logic.go @@ -282,6 +282,8 @@ func HandlerUpdatetaskandachieve(w http.ResponseWriter, data string, uniqueuuid, uinfo.Achieve.KillStar += rdata.Value case ACHIEVE_KILLLINELIE: uinfo.Achieve.KillStarLie += rdata.Value + case ACHIEVE_GETSCORE: + uinfo.Achieve.SumGetScore += int64(rdata.Value) } logger.Info("HandlerUpdatetaskandachieve uinfo=%v rdata=%v", uinfo, rdata) SaveUserInfo(uinfo, uniqueuuid) -- libgit2 0.21.0