余额不足判断使用服务器数据而不是本地数据
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m18s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m18s
This commit is contained in:
parent
7cbc029c07
commit
8eb109079e
@ -4,7 +4,7 @@ import { SlotBar } from "./SlotBar";
|
||||
import { GAME_DATA, SLOT_BAR_EVENT, SLOT_GAME_EVENT, SYS_GIFT, WIN_TYPE, } from "./Define";
|
||||
import { SlotMsg } from "./SlotMsg";
|
||||
import { GameDataManager } from "../../Main/Scripts/managers/GameDataManager";
|
||||
import { callGameApi } from "../../Main/Scripts/main/comm";
|
||||
import { callGameApi, callGameBalanceApi, getGameId } from "../../Main/Scripts/main/comm";
|
||||
import { I18nManager } from "../../Main/Scripts/managers/I18nManager";
|
||||
import { UIManager } from "../../Main/Scripts/managers/UIManager";
|
||||
import { NodePoolManager } from "../../Main/Scripts/managers/NodePoolManager";
|
||||
@ -220,7 +220,9 @@ export class SlotScene extends Component {
|
||||
this.slotBar.setWin(0);
|
||||
}
|
||||
|
||||
if (this.slotBar.getBalance() < (buyType == 1 ? this.slotBar.getBet() * this.gameInfo.BuyMul : (this.isDoubleWin ? this.slotBar.getdisplayBet() : this.slotBar.getBet())) && !this.isFreeSpin && !this.spinInfo.Frb.Ongoing) {
|
||||
let curBalanceData = await callGameBalanceApi({ GameId: getGameId() })
|
||||
let curBalance = curBalanceData.Balance
|
||||
if (curBalance < (buyType == 1 ? this.slotBar.getBet() * this.gameInfo.BuyMul : (this.isDoubleWin ? this.slotBar.getdisplayBet() : this.slotBar.getBet())) && !this.isFreeSpin && !this.spinInfo.Frb.Ongoing) {
|
||||
//余额不足不经过服务器,在客户端拦截
|
||||
this.showErrorTip(2, "", () => { this.slotBar.onConfirmErr2() });
|
||||
this.handleErrSpin();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user