parent
7ceef9878c
commit
29c71a6efc
|
@ -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})
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue