Commit e854c69c250164447cfb2ff457ab386354323219
1 parent
bf64db0d
Exists in
master
提交
Showing
1 changed file
with
25 additions
and
0 deletions
Show diff stats
src/HttpServer/logic/logic.go
| ... | ... | @@ -355,7 +355,32 @@ func HandlerTestaddCat(w http.ResponseWriter, data string, uuid int) { |
| 355 | 355 | //赌博猫 |
| 356 | 356 | uinfo.SetDuboCatPos(catid) |
| 357 | 357 | } else { |
| 358 | + | |
| 358 | 359 | uinfo.PosInfo[rdata.Position].Cat = catid |
| 360 | + if catid > 36 { | |
| 361 | + pos := rdata.Position | |
| 362 | + cfg := jsonconf.GetRedCatConfig(catid) | |
| 363 | + if cfg == nil { | |
| 364 | + logger.Error("HandlerTestaddCat Position failed=%v", err) | |
| 365 | + resp.Code = 1 | |
| 366 | + resp.Message = "参数错误" | |
| 367 | + break | |
| 368 | + } | |
| 369 | + //需要处理红包 | |
| 370 | + if cfg.Id == 13 { | |
| 371 | + uinfo.PosInfo[pos].Time = 10 * 60 | |
| 372 | + uinfo.PosInfo[pos].StartTime = int(time.Now().Unix()) | |
| 373 | + } | |
| 374 | + if cfg.Id == 14 { | |
| 375 | + uinfo.PosInfo[pos].Time = 15 * 60 | |
| 376 | + uinfo.PosInfo[pos].StartTime = int(time.Now().Unix()) | |
| 377 | + } | |
| 378 | + if cfg.Id == 2 { | |
| 379 | + uinfo.PosInfo[pos].Time = 24 * 60 * 60 | |
| 380 | + uinfo.PosInfo[pos].StartTime = int(time.Now().Unix()) | |
| 381 | + } | |
| 382 | + uinfo.PosInfo[pos].RedPacket = cfg.Money | |
| 383 | + } | |
| 359 | 384 | } |
| 360 | 385 | |
| 361 | 386 | uinfo.CalcGoldRate() | ... | ... |