Commit 57092c85ac59a58aabfad5999edde98ad0940ad8

Authored by 陆恒
1 parent 506f7882
Exists in master

提交

src/HttpServer/jsonconf/AchievementConfig.json
... ... @@ -224,7 +224,7 @@
224 224 "is_video": 1
225 225 },
226 226 {
227   - "type": 4,
  227 + "type": 3,
228 228 "id": 29,
229 229 "desc": "累计观看视频360次",
230 230 "aim": 360,
... ... @@ -232,7 +232,7 @@
232 232 "is_video": 1
233 233 },
234 234 {
235   - "type": 4,
  235 + "type": 3,
236 236 "id": 30,
237 237 "desc": "累计观看视频400次",
238 238 "aim": 400,
... ...
src/HttpServer/logic/constdef.go
... ... @@ -12,6 +12,7 @@ const (
12 12 TASKTYPE_USEITEMTIMES = 8 //8表示使用道具次数
13 13 ACHIEVE_KILLLINE = 9 //表示消除行数
14 14 ACHIEVE_KILLLINELIE = 10 //表示消除列数
  15 + ACHIEVE_GETSCORE = 11 //表示累计得到分数
15 16  
16 17 )
17 18  
... ...
src/HttpServer/logic/datadef.go
... ... @@ -452,9 +452,10 @@ type TaskInfo struct {
452 452  
453 453 //
454 454 type AchieveMentInfo struct {
455   - WatchAdsCnt int //观看视频数
456   - KillStar int //消除行数
457   - KillStarLie int //消除列数
  455 + WatchAdsCnt int //观看视频数
  456 + KillStar int //消除行数
  457 + KillStarLie int //消除列数
  458 + SumGetScore int64 //累计获得分数
458 459 //SumGetGuan int //存钱罐累计提取
459 460 //SumUseItemCnt int //使用道具次数累计
460 461 }
... ...
src/HttpServer/logic/function.go
... ... @@ -94,7 +94,7 @@ func (uinfo *UserData) CalcAchieveList(list *TaskList, uniqueid string) *TaskLis
94 94 if val.Taskstatus == 1 {
95 95 switch cfg.Type {
96 96 case ACHIEVETYPE_GETSCORE:
97   - if uinfo.HighScore >= int64(cfg.Aim) {
  97 + if uinfo.Achieve.SumGetScore >= int64(cfg.Aim) {
98 98 list.Taskdata[k].Taskstatus = 2
99 99 }
100 100 case ACHIEVETYPE_LOGINDAY:
... ...
src/HttpServer/logic/logic.go
... ... @@ -282,6 +282,8 @@ func HandlerUpdatetaskandachieve(w http.ResponseWriter, data string, uniqueuuid,
282 282 uinfo.Achieve.KillStar += rdata.Value
283 283 case ACHIEVE_KILLLINELIE:
284 284 uinfo.Achieve.KillStarLie += rdata.Value
  285 + case ACHIEVE_GETSCORE:
  286 + uinfo.Achieve.SumGetScore += int64(rdata.Value)
285 287 }
286 288 logger.Info("HandlerUpdatetaskandachieve uinfo=%v rdata=%v", uinfo, rdata)
287 289 SaveUserInfo(uinfo, uniqueuuid)
... ...