Commit 3b090d2ce1b28c01c61c968acbf401a112b03c37
1 parent
caa59e9f
Exists in
master
提交
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
src/HttpServer/logic/logic.go
... | ... | @@ -1100,7 +1100,10 @@ func HandlerLogin(w http.ResponseWriter, data string, uniqueuuid, gameid, channe |
1100 | 1100 | offgold = 150 |
1101 | 1101 | } |
1102 | 1102 | |
1103 | - uinfo.OfflineGold = offgold | |
1103 | + uinfo.OfflineGold += offgold | |
1104 | + if uinfo.OfflineGold > 150 { | |
1105 | + uinfo.OfflineGold = 150 | |
1106 | + } | |
1104 | 1107 | uinfo.LastUpdateTime = int(time.Now().Unix()) |
1105 | 1108 | } |
1106 | 1109 | ... | ... |