diff --git a/src/HttpServer/jsonconf/jsonconf.go b/src/HttpServer/jsonconf/jsonconf.go index e3f3a8f..5993afd 100644 --- a/src/HttpServer/jsonconf/jsonconf.go +++ b/src/HttpServer/jsonconf/jsonconf.go @@ -102,7 +102,7 @@ func GetTurnTableCfg(id int) *TurnTableDesc { //获取红包猫配置 func GetRedCatConfig(lv int) *RedCatDesc { - reallv := lv - 100 + reallv := lv - 37 if reallv < 1 { reallv = 1 } diff --git a/src/HttpServer/logic/function.go b/src/HttpServer/logic/function.go index 6b5f11c..f7a61fe 100644 --- a/src/HttpServer/logic/function.go +++ b/src/HttpServer/logic/function.go @@ -585,7 +585,7 @@ func (udata *UserData) CalcGoldRate() int64 { if v.Warelv == 0 { continue } - rcfg := jsonconf.GetRedCatConfig(v.Warelv + REDCATIDEXTRA) + rcfg := jsonconf.GetRedCatConfig(v.Warelv) if rcfg != nil { if rcfg.Is_37 != 0 { onerate, _ := strconv.ParseInt(cfg37.Gold_get, 10, 64) @@ -631,7 +631,7 @@ func (u *UserData) CalcHigestCatName() string { return "" } for _, val := range wdata.Info { - reallv := val.Warelv + REDCATIDEXTRA + reallv := val.Warelv if higestlv < reallv { higestlv = reallv } @@ -713,5 +713,10 @@ func (u *UserData) tryPutToWareHouse(info *UserWareHouseData, pos int, uuid int) //根据id获得仓位位置 func (w *UserWareHouseData) GetWarePosById(cid int) int { + for k, v := range w.Info { + if v.Warelv == cid { + return k + } + } return -1 } diff --git a/src/HttpServer/logic/logic.go b/src/HttpServer/logic/logic.go index 79da84b..fcbd591 100644 --- a/src/HttpServer/logic/logic.go +++ b/src/HttpServer/logic/logic.go @@ -1289,7 +1289,7 @@ func HandlerQueryWareHouse(w http.ResponseWriter, data string, uuid int) { } for _, v := range udata.Info { - catlv := v.Warelv + REDCATIDEXTRA + catlv := v.Warelv resp.Data.CatList = append(resp.Data.CatList, catlv) } -- libgit2 0.21.0