免费赠送逻辑修改
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 46s

This commit is contained in:
TJH 2025-12-03 11:16:14 +08:00
parent 69f0824a61
commit b8a82fde32
2 changed files with 20 additions and 5 deletions

View File

@ -262,11 +262,22 @@ export class SlotScene extends Component {
} }
GameDataManager.instance.frb = this.spinInfo.Frb; GameDataManager.instance.frb = this.spinInfo.Frb;
let count = frb.Ongoing.Frn - 1; if (frb) {
let count = 0;
if (frb.Ongoing != null) {
count = frb.Ongoing.Frn - 1;
}
if (frb.Finished != null) {
count = frb.Finished.Frn;
}
if (count <= 0) { if (count <= 0) {
count = 0; count = 0;
} }
this.SysGift.handleSysInfoFreeCount(count); this.SysGift.handleSysInfoFreeCount(count);
}
// if (frb?.Ongoing?.Frn - 1 != GameDataManager.instance.frb?.Ongoing?.Frn) { // if (frb?.Ongoing?.Frn - 1 != GameDataManager.instance.frb?.Ongoing?.Frn) {
// this.SysGift.handleSysInfoFreeCount(this.spinInfo.Frb.Ongoing.Frn); // this.SysGift.handleSysInfoFreeCount(this.spinInfo.Frb.Ongoing.Frn);
// } // }

View File

@ -104,8 +104,12 @@ export class SysGift extends Component {
handleSysInfoFreeCount(countNum: number) { handleSysInfoFreeCount(countNum: number) {
let frb = GameDataManager.instance.frb; let frb = GameDataManager.instance.frb;
if (!frb) return; if (!frb) return;
if (frb.Finished == null) {
let count = this.info.getChildByName('count'); let count = this.info.getChildByName('count');
if (frb.Finished == null) {
count.getComponent(Label).string = (countNum).toLocaleString();
this.show(count);
} else {
count.getComponent(Label).string = (countNum).toLocaleString(); count.getComponent(Label).string = (countNum).toLocaleString();
this.show(count); this.show(count);
} }