Commit 57092c85ac59a58aabfad5999edde98ad0940ad8

Authored by 陆恒
1 parent 506f7882
Exists in master

提交

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