[add] 自動入桌選擇沒人玩的(fs=0)
This commit is contained in:
parent
412da42efd
commit
bdd124b229
@ -82,7 +82,7 @@ export class BJ_Casino_Bot_Lobby {
|
|||||||
}
|
}
|
||||||
await this._loadJSON(slot);
|
await this._loadJSON(slot);
|
||||||
this.IsSlotIn.value = true;
|
this.IsSlotIn.value = true;
|
||||||
let table: number = 1;
|
let table: number = 0;
|
||||||
let req: SeatListRequest = new SeatListRequest(hall, slot);
|
let req: SeatListRequest = new SeatListRequest(hall, slot);
|
||||||
await req.SendAsync(true);
|
await req.SendAsync(true);
|
||||||
let resp: INetResponse<JSON> = req.Result;
|
let resp: INetResponse<JSON> = req.Result;
|
||||||
@ -91,19 +91,25 @@ export class BJ_Casino_Bot_Lobby {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let data: any = resp.Data;
|
let data: any = resp.Data;
|
||||||
|
let alternate: number = 0;
|
||||||
for (let i: number = 0; i < data.length; i++) {
|
for (let i: number = 0; i < data.length; i++) {
|
||||||
const element: any = data[i];
|
const element: any = data[i];
|
||||||
|
const freegameNotGetCount: number = +element[2][0];
|
||||||
if (element[0].length > 0) {
|
if (element[0].length > 0) {
|
||||||
let aid: string = element[0][0];
|
let aid: string = element[0][0];
|
||||||
if (+aid === +this._bj_Casino_Bot.UserData.AID) {
|
if (+aid === +this._bj_Casino_Bot.UserData.AID) {
|
||||||
table = i + 1;
|
alternate = i + 1;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else if (freegameNotGetCount === 0) {
|
||||||
table = i + 1;
|
table = i + 1;
|
||||||
break;
|
break;
|
||||||
|
} else if (alternate === 0) {
|
||||||
|
alternate = i + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (table === 0) {
|
||||||
|
table = alternate;
|
||||||
|
}
|
||||||
let resp_slotIn: any = await this._slotIn(hall, slot, table);
|
let resp_slotIn: any = await this._slotIn(hall, slot, table);
|
||||||
if (!resp_slotIn.IsValid) {
|
if (!resp_slotIn.IsValid) {
|
||||||
this.IsSlotIn.value = false;
|
this.IsSlotIn.value = false;
|
||||||
@ -154,7 +160,7 @@ export class BJ_Casino_Bot_Lobby {
|
|||||||
await req.SendAsync(true);
|
await req.SendAsync(true);
|
||||||
let resp: INetResponse<JSON> = req.Result;
|
let resp: INetResponse<JSON> = req.Result;
|
||||||
if (resp.IsValid) {
|
if (resp.IsValid) {
|
||||||
this._bj_Casino_Bot.AddLog(`進機台成功 slot: ${slot}, hall: ${this.LobbyCongig[1][hall - 1]}, table: ${uid}`);
|
this._bj_Casino_Bot.AddLog(`進機台成功 slot: ${slot}, 廳館: ${this.LobbyCongig[1][hall - 1]}, 桌號: ${uid}`);
|
||||||
} else {
|
} else {
|
||||||
switch (resp.Status) {
|
switch (resp.Status) {
|
||||||
case 11:
|
case 11:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user