You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
154 lines
4.1 KiB
154 lines
4.1 KiB
/**
|
|
* 局外每日商店已下线:保留空壳 API,避免旧 UI/GM 引用编译失败。
|
|
* 局内 buff 请用 BattleBuffCarryStore / BattleBuffSelectService。
|
|
*/
|
|
import type { DailyShopParsed } from './DailyShopTypes';
|
|
import {
|
|
DAILY_SHOP_ACTIVE_SLOTS,
|
|
DAILY_SHOP_PASSIVE_SLOTS,
|
|
DailyShopKind,
|
|
} from './DailyShopTypes';
|
|
|
|
/** @deprecated 局外商店已拆除 */
|
|
export class DailyShopDataManager {
|
|
/** GM:无限商店(已失效) */
|
|
static GM_UNLIMITED_DAILY_SHOP = false;
|
|
|
|
/** no-op */
|
|
static ensureToday(): void {}
|
|
|
|
/** no-op */
|
|
static async ensureTable(): Promise<void> {}
|
|
|
|
/** no-op */
|
|
static applyDayResetIfNeeded(): void {}
|
|
|
|
/** no-op */
|
|
static onCrossDay(): void {}
|
|
|
|
/** no-op */
|
|
static clearForReset(): void {}
|
|
|
|
/** no-op */
|
|
static refreshPoolsOnSettle(): void {}
|
|
|
|
/** no-op */
|
|
static markSettleBuyPop(): void {}
|
|
|
|
/** 不再弹结算商店 */
|
|
static popSettleShopPanelIfNeeded(): boolean {
|
|
return false;
|
|
}
|
|
|
|
/** no-op */
|
|
static tryPopLotteryAfterBuyClose(): void {}
|
|
|
|
/** no-op */
|
|
static syncGmForceCarry(): void {}
|
|
|
|
static getSlotCaps(): { active: number; passive: number } {
|
|
return { active: DAILY_SHOP_ACTIVE_SLOTS, passive: DAILY_SHOP_PASSIVE_SLOTS };
|
|
}
|
|
|
|
static getOffers(): never[] {
|
|
return [];
|
|
}
|
|
|
|
static getActiveSlotIds(): number[] {
|
|
return [];
|
|
}
|
|
|
|
static getPassiveSlotIds(): number[] {
|
|
return [];
|
|
}
|
|
|
|
static getOwnedActive(): DailyShopParsed[] {
|
|
return [];
|
|
}
|
|
|
|
static getOwnedPassive(): DailyShopParsed[] {
|
|
return [];
|
|
}
|
|
|
|
static getParsed(_id: number): DailyShopParsed | null {
|
|
return null;
|
|
}
|
|
|
|
static hasUsedShopPurchase(): boolean {
|
|
return false;
|
|
}
|
|
|
|
static getPendingReplaceGoodsId(): number {
|
|
return 0;
|
|
}
|
|
|
|
static cancelPendingReplace(): void {}
|
|
|
|
static getOccupiedSlotEntries(_kind: DailyShopKind): never[] {
|
|
return [];
|
|
}
|
|
|
|
static removeSlotAt(_kind: DailyShopKind, _slotIndex: number): boolean {
|
|
return false;
|
|
}
|
|
|
|
static purchase(_goodsId: number, _opts?: { payByAd?: boolean }): { ok: boolean } {
|
|
console.warn('[DailyShop] 商店已下线');
|
|
return { ok: false };
|
|
}
|
|
|
|
static completeReplace(_replaceOwnedId: number): { ok: boolean } {
|
|
console.warn('[DailyShop] 商店已下线');
|
|
return { ok: false };
|
|
}
|
|
|
|
static purchaseLottery(_id: number): { ok: boolean } {
|
|
console.warn('[DailyShop] 商店已下线');
|
|
return { ok: false };
|
|
}
|
|
|
|
static rollOpenBuffs(_count: number): number[] {
|
|
return [];
|
|
}
|
|
|
|
static purchaseOpen(_id: number, _opts?: { payByAd?: boolean }): { ok: boolean } {
|
|
console.warn('[DailyShop] 商店已下线');
|
|
return { ok: false };
|
|
}
|
|
|
|
static getLotteryPoolSlots(): number[] {
|
|
return [];
|
|
}
|
|
|
|
static rollLotteryWinnerId(): number {
|
|
return 0;
|
|
}
|
|
|
|
static hasUsedLotteryPurchase(): boolean {
|
|
return false;
|
|
}
|
|
|
|
static gmResetShopAndLotteryKeepCarry(): void {
|
|
console.warn('[DailyShop] 商店已下线');
|
|
}
|
|
|
|
static gmClearCarriedBuffs(): void {
|
|
// 延迟引用,避免与 CarryStore 启动顺序纠缠
|
|
const { BattleBuffCarryStore } = require('./battleBuff/BattleBuffCarryStore') as typeof import('./battleBuff/BattleBuffCarryStore');
|
|
BattleBuffCarryStore.clear();
|
|
}
|
|
|
|
/**
|
|
* GM:向本机 CarryStore 追加 buff。
|
|
* @param _kind 忽略(一律 append)
|
|
* @param rawId Battlebuff.id
|
|
*/
|
|
static gmSetFirstCarrySlot(_kind: DailyShopKind, rawId: string): { ok: boolean; message?: string } {
|
|
const id = Math.floor(Number(rawId) || 0);
|
|
if (id <= 0) return { ok: false, message: '非法 id' };
|
|
const { BattleBuffCarryStore } = require('./battleBuff/BattleBuffCarryStore') as typeof import('./battleBuff/BattleBuffCarryStore');
|
|
const parsed = BattleBuffCarryStore.appendBuffId(0, id);
|
|
if (!parsed) return { ok: false, message: '写入失败' };
|
|
return { ok: true };
|
|
}
|
|
}
|
|
|