Commit 65ef179ba0ee4133d9d834db190086364a4c8993
1 parent
aed6964c
Exists in
master
提交
Showing
2 changed files
with
10 additions
and
2 deletions
Show diff stats
src/HttpServer/logic/function.go
... | ... | @@ -411,6 +411,7 @@ func (u *UserData) DoFlopCardd(resp *DoFlopResp) { |
411 | 411 | u.SetDuboCatPos(catid) |
412 | 412 | } |
413 | 413 | u.Gold += addgold |
414 | + u.GoldSum += addgold | |
414 | 415 | u.CalcGoldRate() |
415 | 416 | |
416 | 417 | u.FlopCardLefCnt-- |
... | ... | @@ -1000,8 +1001,8 @@ func (u *UserData) CalcHigestCatName() string { |
1000 | 1001 | } |
1001 | 1002 | |
1002 | 1003 | //计算猫名字 |
1003 | - if higestlv > 100 { | |
1004 | - cfg := jsonconf.GetRedCatConfig(higestlv - 100) | |
1004 | + if higestlv > REDCATIDEXTRA { | |
1005 | + cfg := jsonconf.GetRedCatConfig(higestlv) | |
1005 | 1006 | if cfg == nil { |
1006 | 1007 | logger.Error("CalcHigestCatName failed getcfg higestlv=%v", higestlv) |
1007 | 1008 | return "" | ... | ... |
src/HttpServer/logic/logic.go
... | ... | @@ -292,6 +292,7 @@ func HandlerChangeCoin(w http.ResponseWriter, data string, uuid int) { |
292 | 292 | addgold := rdata.Coin |
293 | 293 | if rdata.Type == 0 { |
294 | 294 | uinfo.Gold += addgold |
295 | + uinfo.GoldSum += addgold | |
295 | 296 | } else { |
296 | 297 | uinfo.Gold -= addgold |
297 | 298 | } |
... | ... | @@ -602,6 +603,7 @@ func HandlerGetflyboxreward(w http.ResponseWriter, data string, uuid int) { |
602 | 603 | resp.Data.Getgold = int64(float32(uinfo.Goldrate) * cfg.Time) |
603 | 604 | |
604 | 605 | uinfo.Gold += resp.Data.Getgold |
606 | + uinfo.GoldSum += resp.Data.Getgold | |
605 | 607 | } else if cfg.Ttype == 2 { |
606 | 608 | //红包 |
607 | 609 | resp.Data.Getredbag = cfg.Time |
... | ... | @@ -910,6 +912,7 @@ func HandlerGetboxreward(w http.ResponseWriter, data string, uuid int) { |
910 | 912 | resp.Data.Getgold = int64(float32(uinfo.Goldrate) * cfg.Time) |
911 | 913 | resp.Data.Getgold = resp.Data.Getgold * mult |
912 | 914 | uinfo.Gold += resp.Data.Getgold |
915 | + uinfo.GoldSum += resp.Data.Getgold | |
913 | 916 | } else if cfg.Ttype == 2 { |
914 | 917 | //红包 |
915 | 918 | resp.Data.Getredbag = cfg.Time * float32(mult) |
... | ... | @@ -1572,6 +1575,7 @@ func HandlerDrawTable(w http.ResponseWriter, data string, uuid int) { |
1572 | 1575 | } |
1573 | 1576 | |
1574 | 1577 | uinfo.Gold += addgold |
1578 | + uinfo.GoldSum += addgold | |
1575 | 1579 | |
1576 | 1580 | SaveUserInfo(uinfo, strconv.Itoa(uuid)) |
1577 | 1581 | resp.Data.Coin = strconv.FormatInt(addgold, 10) |
... | ... | @@ -2001,6 +2005,7 @@ func HandlerRecovery(w http.ResponseWriter, data string, uuid int) { |
2001 | 2005 | //加金币 |
2002 | 2006 | price, _ := strconv.ParseInt(cfg.Price, 10, 64) |
2003 | 2007 | uinfo.Gold += price / 10 |
2008 | + uinfo.GoldSum += price / 10 | |
2004 | 2009 | |
2005 | 2010 | SaveUserInfo(uinfo, strconv.Itoa(uuid)) |
2006 | 2011 | |
... | ... | @@ -2102,6 +2107,7 @@ func HandlerRecvTimingReward(w http.ResponseWriter, data string, uuid int) { |
2102 | 2107 | addgold = addgold * 2 |
2103 | 2108 | } |
2104 | 2109 | uinfo.Gold += addgold |
2110 | + uinfo.GoldSum += addgold | |
2105 | 2111 | uinfo.LastTimingRewardHour = nowmin / 30 |
2106 | 2112 | uinfo.LeftTimingRewardTimes-- |
2107 | 2113 | //uinfo.GetWatchAdsGoldTime-- |
... | ... | @@ -2145,6 +2151,7 @@ func HandlerWatchAdsGetGold(w http.ResponseWriter, data string, uuid int) { |
2145 | 2151 | uinfo.GetWatchAdsGoldTime-- |
2146 | 2152 | addgold := uinfo.Goldrate * WATCHADSGOLDLRATE |
2147 | 2153 | uinfo.Gold += addgold |
2154 | + uinfo.GoldSum += addgold | |
2148 | 2155 | |
2149 | 2156 | resp.Data.Reward = strconv.FormatInt(addgold, 10) |
2150 | 2157 | resp.Data.LeftTimes = uinfo.GetWatchAdsGoldTime | ... | ... |