根本原因: LP_Bot 介面老舊且環境設定寫死在程式內,新增平台或環境都要改碼重建。 影響: 全新深色控制台介面;首頁改為「平台+環境+Token」,平台清單與連線設定 即時讀取 Google 試算表(quickopen 同款資料來源),選擇與 Token 會記憶於 localStorage;支援「開遊戲」直開跳過維護網址;SD 機台自製 Spin 面板 (押注/延遲/倍率停/轉數停+Log 終端)。 修法: - 底層引擎(Engine/Common/define/FormTable*)自 LP_Bot 原封搬移 - UI 層全部重寫(Login/Lobby/SlotList/SDGame),antd 深色主題 - 新增 GoogleSheetService:service account 簽 JWT 讀 Sheets API, 非安全來源 fallback jsrsasign - 移除 React.StrictMode(雙重掛載會讓 NetManagerSD 單例連線互蓋) - SD socket 依 gameUrl 協定強制 wss - 機台 1310/1311/1801/1803/1804/1805 Spin 帶 mode:0 特例 (依 SD3 客戶端 MainState 原始碼) - credentials.json 不進版控,附 credentials.example.json 範本 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
98 lines
1.5 KiB
TypeScript
98 lines
1.5 KiB
TypeScript
import { NetRequest } from "../../Engine/CatanEngine/NetManagerV2/NetRequest";
|
|
|
|
// #region Request
|
|
|
|
export type RpcAdSyncRequest = null
|
|
export type RpcAdSyncResponse = [TLobbyAdData[], TPopupAdData[]]
|
|
|
|
export class AdSyncRequest extends NetRequest<RpcAdSyncRequest, RpcAdSyncResponse> {
|
|
get Method(): string {
|
|
return "ad.sync";
|
|
}
|
|
constructor() {
|
|
super();
|
|
}
|
|
}
|
|
|
|
// #endregion
|
|
|
|
// #region Type
|
|
|
|
export type TLobbyAdData = [
|
|
id: number,
|
|
type: AdSyncType,
|
|
priority: number,
|
|
image: string,
|
|
param: TAdParam,
|
|
time: number,
|
|
];
|
|
|
|
export type TPopupAdData = [
|
|
id: number,
|
|
type: AdSyncType,
|
|
priority: number,
|
|
image: string,
|
|
param: TAdParam,
|
|
cond: IPopupAdCond,
|
|
time: number,
|
|
intervalTime: number,
|
|
];
|
|
|
|
export type TAdParam = any[];
|
|
|
|
// #endregion
|
|
|
|
// #region Interface
|
|
|
|
export interface IPopupAdCond {
|
|
/** 每日首次登入 */
|
|
1: number,
|
|
|
|
/** 進入大廳 */
|
|
2: number,
|
|
|
|
/** 進度大廳且金幣低於1000 */
|
|
3: number,
|
|
|
|
/** 在大廳關閉商城頁 */
|
|
4: number,
|
|
|
|
/** 離開特定機台跳出 */
|
|
5: number,
|
|
}
|
|
|
|
// #endregion
|
|
|
|
// #region Enum
|
|
|
|
export enum AdType {
|
|
/** 大廳 */
|
|
lobby_ad = 1,
|
|
/** 蓋台 */
|
|
inter_ad = 2
|
|
}
|
|
|
|
export enum AdSyncType {
|
|
/** 純廣告 */
|
|
Ad = 1,
|
|
/** 得來購 */
|
|
Dlygo,
|
|
/** 前往商城 */
|
|
Shop,
|
|
/** 指定機台 */
|
|
Slot,
|
|
/** 公告 */
|
|
Announce,
|
|
/** 活動 */
|
|
Activity,
|
|
/** 任務 */
|
|
Task,
|
|
/** 首頁教學 */
|
|
FrontPageTutorial,
|
|
/** 贈禮 */
|
|
Txn,
|
|
/** 排行 */
|
|
Rank,
|
|
}
|
|
|
|
// #endregion
|