diff --git a/src/HttpServer/logic/logic.go b/src/HttpServer/logic/logic.go index 4ce677e..e771cf0 100644 --- a/src/HttpServer/logic/logic.go +++ b/src/HttpServer/logic/logic.go @@ -355,7 +355,32 @@ func HandlerTestaddCat(w http.ResponseWriter, data string, uuid int) { //赌博猫 uinfo.SetDuboCatPos(catid) } else { + uinfo.PosInfo[rdata.Position].Cat = catid + if catid > 36 { + pos := rdata.Position + cfg := jsonconf.GetRedCatConfig(catid) + if cfg == nil { + logger.Error("HandlerTestaddCat Position failed=%v", err) + resp.Code = 1 + resp.Message = "参数错误" + break + } + //需要处理红包 + if cfg.Id == 13 { + uinfo.PosInfo[pos].Time = 10 * 60 + uinfo.PosInfo[pos].StartTime = int(time.Now().Unix()) + } + if cfg.Id == 14 { + uinfo.PosInfo[pos].Time = 15 * 60 + uinfo.PosInfo[pos].StartTime = int(time.Now().Unix()) + } + if cfg.Id == 2 { + uinfo.PosInfo[pos].Time = 24 * 60 * 60 + uinfo.PosInfo[pos].StartTime = int(time.Now().Unix()) + } + uinfo.PosInfo[pos].RedPacket = cfg.Money + } } uinfo.CalcGoldRate() -- libgit2 0.21.0