Commit 2efb3992e151303b2b6ebc611f38ac3d95143c68

Authored by 陆恒
1 parent f16f3a9d
Exists in master

提交

src/HttpServer/logic/datadef.go
... ... @@ -141,7 +141,7 @@ type GetrandredbagReq struct {
141 141 }
142 142  
143 143 type GetrandredbagData struct {
144   - Getnum int `json:"getnum"`
  144 + Getnum float32 `json:"getnum"`
145 145 }
146 146  
147 147 type GetrandredbagResp struct {
... ...
src/HttpServer/logic/logic.go
... ... @@ -947,8 +947,8 @@ func HandlerGetrandredbag(w http.ResponseWriter, data string, uuid int) {
947 947  
948 948 addnum := uinfo.CalcRandRedBagNum()
949 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 953 uinfo.SumRandRedBagTimes++
954 954 uinfo.RandRedBagLeftTime--
... ... @@ -979,8 +979,8 @@ func HandlerGetrandredbag(w http.ResponseWriter, data string, uuid int) {
979 979 //计算一下零取值
980 980 addnum := uinfo.CalcRandRedBagNum()
981 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 985 uinfo.StoreRandRedBag--
986 986 uinfo.SumRandRedBagTimes++
... ...