From a0050bd44d2881158eb3499bc8cb9c166c53421b Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Fri, 24 May 2024 15:23:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A6=BB=E7=BA=BF=E5=8A=A0=E5=B8=81=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/trascate_webapi.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/worldsrv/trascate_webapi.go b/worldsrv/trascate_webapi.go index 3f01b72..acee273 100644 --- a/worldsrv/trascate_webapi.go +++ b/worldsrv/trascate_webapi.go @@ -1627,17 +1627,21 @@ func init() { CacheDataMgr.CacheBillNumber(billNo, platform) //防止手抖点两下 player := PlayerMgrSington.GetPlayerBySnId(member_snid) - var remainNum = player.Coin + var remainNum int64 var addcoin, diamond int64 = msg.GetGold(), 0 var logtype = int32(common.GainWay_API_AddCoin) if msg.GetLogType() == 1 { addcoin = 0 diamond = msg.GetGold() - remainNum = player.Diamond } money := msg.Money //玩家在线 if player != nil { + if msg.GetLogType() == 1 { + remainNum = player.Diamond + } else { + remainNum = player.Coin + } //玩家在游戏内 if player.scene != nil { CacheDataMgr.ClearCacheBill(billNo, platform) @@ -1736,6 +1740,12 @@ func init() { } } + if msg.GetLogType() == 1 { + remainNum = findPlayer.Diamond + } else { + remainNum = findPlayer.Coin + } + //增加帐变记录 coinlogex := model.NewCoinLogEx(&model.CoinLogParam{ Platform: findPlayer.Platform,