Commit fd5b25beb738dffa90ac5fe091bd7a3ccd9d0364
1 parent
92abaeca
Exists in
master
提交
Showing
1 changed file
with
11 additions
and
2 deletions
Show diff stats
src/HttpServer/logic/logic.go
... | ... | @@ -476,15 +476,24 @@ func HandlerDoBuyCat(w http.ResponseWriter, data string, uuid int) { |
476 | 476 | } |
477 | 477 | |
478 | 478 | //获取配置 |
479 | + //获取最高猫 | |
480 | + _, higest := uinfo.CalcHigestCatName() | |
481 | + highcfg := jsonconf.GetCatConfig(higest) | |
482 | + if highcfg == nil { | |
483 | + logger.Error("HandlerDoBuyCat get cat cfg failed=%v,lv=%v", err, rdata.CatId) | |
484 | + resp.Code = 1 | |
485 | + resp.Message = "服务器错误" | |
486 | + break | |
487 | + } | |
479 | 488 | catcfg := jsonconf.GetCatConfig(rdata.CatId) |
480 | 489 | if catcfg == nil { |
481 | 490 | logger.Error("HandlerDoBuyCat get cat cfg failed=%v,lv=%v", err, rdata.CatId) |
482 | 491 | resp.Code = 1 |
483 | - resp.Message = "get cat cfg failed" | |
492 | + resp.Message = "服务器错误" | |
484 | 493 | break |
485 | 494 | } |
486 | 495 | |
487 | - maxlv := catcfg.Level_buy | |
496 | + maxlv := highcfg.Level_buy | |
488 | 497 | if maxlv < 1 { |
489 | 498 | //最小1j |
490 | 499 | maxlv = 1 | ... | ... |