fix:比赛场积分错误

周卡每日金币不能添加到比赛场
This commit is contained in:
sk 2024-08-07 00:03:22 +08:00
parent 7ceef9878c
commit 29c71a6efc
2 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@ func (this *AddCoinTransactHandler) OnExcute(tNode *transact.TransNode, ud inter
s := p.GetScene()
if s != nil {
sp := s.GetScenePolicy()
if sp != nil && sp.CanAddCoin(s, p, ctx.Coin) {
if sp != nil && sp.CanAddCoin(s, p, ctx.Coin) && !s.IsMatchScene() {
p.AddCoinAsync(ctx.Coin, ctx.GainWay, true, ctx.Broadcast, ctx.Oper, ctx.Remark, ctx.WriteLog)
//触发下事件
sp.OnPlayerEvent(s, p, base.PlayerEventRecharge, []int64{ctx.Coin})
@ -57,7 +57,7 @@ func (this *AddCoinTransactHandler) OnRollBack(tNode *transact.TransNode) transa
s := p.GetScene()
if s != nil {
sp := s.GetScenePolicy()
if sp != nil && sp.CanAddCoin(s, p, -ctx.Coin) {
if sp != nil && sp.CanAddCoin(s, p, -ctx.Coin) && !s.IsMatchScene() {
p.AddCoinAsync(-ctx.Coin, ctx.GainWay, true, ctx.Broadcast, ctx.Oper, ctx.Remark, ctx.WriteLog)
//触发下事件
sp.OnPlayerEvent(s, p, base.PlayerEventRecharge, []int64{0})

View File

@ -1965,7 +1965,7 @@ func (this *Player) AddCoin(num, add int64, gainWay int32, oper, remark string)
//this.TotalData(num, gainWay)
async := false
if num > 0 && this.scene != nil && !this.scene.IsTestScene() && this.scene.sceneMode != common.SceneMode_Thr { //游戏场中加币,需要同步到gamesrv上
if num > 0 && this.scene != nil && !this.scene.IsTestScene() && !this.scene.IsMatchScene() && this.scene.sceneMode != common.SceneMode_Thr { //游戏场中加币,需要同步到gamesrv上
if StartAsyncAddCoinTransact(this, num, gainWay, oper, remark, true, 0, true) {
async = true
}