[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);
|
||||
this.IsSlotIn.value = true;
|
||||
let table: number = 1;
|
||||
let table: number = 0;
|
||||
let req: SeatListRequest = new SeatListRequest(hall, slot);
|
||||
await req.SendAsync(true);
|
||||
let resp: INetResponse<JSON> = req.Result;
|
||||
@ -91,18 +91,24 @@ export class BJ_Casino_Bot_Lobby {
|
||||
return;
|
||||
}
|
||||
let data: any = resp.Data;
|
||||
let alternate: number = 0;
|
||||
for (let i: number = 0; i < data.length; i++) {
|
||||
const element: any = data[i];
|
||||
const freegameNotGetCount: number = +element[2][0];
|
||||
if (element[0].length > 0) {
|
||||
let aid: string = element[0][0];
|
||||
if (+aid === +this._bj_Casino_Bot.UserData.AID) {
|
||||
alternate = i + 1;
|
||||
}
|
||||
} else if (freegameNotGetCount === 0) {
|
||||
table = i + 1;
|
||||
break;
|
||||
} else if (alternate === 0) {
|
||||
alternate = i + 1;
|
||||
}
|
||||
} else {
|
||||
table = i + 1;
|
||||
break;
|
||||
}
|
||||
if (table === 0) {
|
||||
table = alternate;
|
||||
}
|
||||
let resp_slotIn: any = await this._slotIn(hall, slot, table);
|
||||
if (!resp_slotIn.IsValid) {
|
||||
@ -154,7 +160,7 @@ export class BJ_Casino_Bot_Lobby {
|
||||
await req.SendAsync(true);
|
||||
let resp: INetResponse<JSON> = req.Result;
|
||||
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 {
|
||||
switch (resp.Status) {
|
||||
case 11:
|
||||
|
Loading…
x
Reference in New Issue
Block a user