Commit 2efb3992e151303b2b6ebc611f38ac3d95143c68
1 parent
f16f3a9d
Exists in
master
提交
Showing
2 changed files
with
5 additions
and
5 deletions
Show diff stats
src/HttpServer/logic/datadef.go
@@ -141,7 +141,7 @@ type GetrandredbagReq struct { | @@ -141,7 +141,7 @@ type GetrandredbagReq struct { | ||
141 | } | 141 | } |
142 | 142 | ||
143 | type GetrandredbagData struct { | 143 | type GetrandredbagData struct { |
144 | - Getnum int `json:"getnum"` | 144 | + Getnum float32 `json:"getnum"` |
145 | } | 145 | } |
146 | 146 | ||
147 | type GetrandredbagResp struct { | 147 | type GetrandredbagResp struct { |
src/HttpServer/logic/logic.go
@@ -947,8 +947,8 @@ func HandlerGetrandredbag(w http.ResponseWriter, data string, uuid int) { | @@ -947,8 +947,8 @@ func HandlerGetrandredbag(w http.ResponseWriter, data string, uuid int) { | ||
947 | 947 | ||
948 | addnum := uinfo.CalcRandRedBagNum() | 948 | addnum := uinfo.CalcRandRedBagNum() |
949 | uinfo.AddRedPackect(addnum, 100) | 949 | uinfo.AddRedPackect(addnum, 100) |
950 | - addgold := int(addnum * 10000) | ||
951 | - resp.Data.Getnum = addgold | 950 | + //addgold := int(addnum * 10000) |
951 | + resp.Data.Getnum = addnum | ||
952 | 952 | ||
953 | uinfo.SumRandRedBagTimes++ | 953 | uinfo.SumRandRedBagTimes++ |
954 | uinfo.RandRedBagLeftTime-- | 954 | uinfo.RandRedBagLeftTime-- |
@@ -979,8 +979,8 @@ func HandlerGetrandredbag(w http.ResponseWriter, data string, uuid int) { | @@ -979,8 +979,8 @@ func HandlerGetrandredbag(w http.ResponseWriter, data string, uuid int) { | ||
979 | //计算一下零取值 | 979 | //计算一下零取值 |
980 | addnum := uinfo.CalcRandRedBagNum() | 980 | addnum := uinfo.CalcRandRedBagNum() |
981 | uinfo.AddRedPackect(addnum, 100) | 981 | uinfo.AddRedPackect(addnum, 100) |
982 | - addgold := int(addnum * 10000) | ||
983 | - resp.Data.Getnum = addgold | 982 | + //addgold := int(addnum * 10000) |
983 | + resp.Data.Getnum = addnum | ||
984 | 984 | ||
985 | uinfo.StoreRandRedBag-- | 985 | uinfo.StoreRandRedBag-- |
986 | uinfo.SumRandRedBagTimes++ | 986 | uinfo.SumRandRedBagTimes++ |