From 506f7882b5794642d301ed98f6ef21a9c8e1c93f Mon Sep 17 00:00:00 2001 From: 陆恒 Date: Mon, 6 Jul 2020 14:51:17 +0800 Subject: [PATCH] 提亀 --- src/HttpServer/logic/datadef.go | 8 +++++--- src/HttpServer/logic/logic.go | 4 ++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/HttpServer/logic/datadef.go b/src/HttpServer/logic/datadef.go index 8affd88..80d1164 100644 --- a/src/HttpServer/logic/datadef.go +++ b/src/HttpServer/logic/datadef.go @@ -155,7 +155,8 @@ type FetchfenredbagReq struct { } type FetchfenredbagData struct { - Wallgold int `json:"wallgold"` + Wallgold int `json:"wallgold"` + Getgoldnum int `json:"getgoldnum"` } type FetchfenredbagResp struct { @@ -165,8 +166,9 @@ type FetchfenredbagResp struct { } type FetchluckybagData struct { - Wallgold int `json:"wallgold"` - Lefttimes int `json:"lefttimes"` + Wallgold int `json:"wallgold"` + Lefttimes int `json:"lefttimes"` + Getgoldnum int `json:"getgoldnum"` } type FetchluckybagResp struct { diff --git a/src/HttpServer/logic/logic.go b/src/HttpServer/logic/logic.go index 3359df6..c3dd6d5 100644 --- a/src/HttpServer/logic/logic.go +++ b/src/HttpServer/logic/logic.go @@ -848,6 +848,7 @@ func HandlerFetchluckybag(w http.ResponseWriter, data string, uniqueuuid, gameid resp.Data.Wallgold = uinfo.RealGold resp.Data.Lefttimes = uinfo.LuckyBagLeftTimes + resp.Data.Getgoldnum = addcoin SaveUserInfo(uinfo, uniqueuuid) @@ -900,6 +901,7 @@ func HandlerFetchfenredbag(w http.ResponseWriter, data string, uniqueuuid, gamei break } + addgold := cfg.Free_coin readgold := 0 readgold, err = AddCoinToSdk(uuid, cfg.Free_coin, gameid, channel, REDBAGTYPE_103) if err != nil { @@ -910,6 +912,7 @@ func HandlerFetchfenredbag(w http.ResponseWriter, data string, uniqueuuid, gamei } if rdata.Ftype == 2 { + addgold += cfg.Video_coin readgold, err = AddCoinToSdk(uuid, cfg.Video_coin, gameid, channel, REDBAGTYPE_106) if err != nil { logger.Info("GetUserInfo HandlerFetchfenredbag data failed:%v,for:%v", err, data) @@ -923,6 +926,7 @@ func HandlerFetchfenredbag(w http.ResponseWriter, data string, uniqueuuid, gamei uinfo.RedBagFetchIdlist = append(uinfo.RedBagFetchIdlist, rdata.Id) resp.Data.Wallgold = uinfo.RealGold + resp.Data.Getgoldnum = addgold SaveUserInfo(uinfo, uniqueuuid) -- libgit2 0.21.0