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.
AdLike2048/assets/script/manager/DailyShopDataManager.ts

155 lines
4.1 KiB

4 days ago
/**
* 局外每日商店已下线:保留空壳 API,避免旧 UI/GM 引用编译失败。
* 局内 buff 请用 BattleBuffCarryStore / BattleBuffSelectService。
*/
import type { DailyShopParsed } from './DailyShopTypes';
3 weeks ago
import {
DAILY_SHOP_ACTIVE_SLOTS,
DAILY_SHOP_PASSIVE_SLOTS,
DailyShopKind,
} from './DailyShopTypes';
4 days ago
/** @deprecated 局外商店已拆除 */
3 weeks ago
export class DailyShopDataManager {
4 days ago
/** GM:无限商店(已失效) */
static GM_UNLIMITED_DAILY_SHOP = false;
3 weeks ago
4 days ago
/** no-op */
static ensureToday(): void {}
3 weeks ago
4 days ago
/** no-op */
static async ensureTable(): Promise<void> {}
3 weeks ago
4 days ago
/** no-op */
static applyDayResetIfNeeded(): void {}
3 weeks ago
4 days ago
/** no-op */
static onCrossDay(): void {}
3 weeks ago
4 days ago
/** no-op */
static clearForReset(): void {}
1 week ago
4 days ago
/** no-op */
static refreshPoolsOnSettle(): void {}
1 week ago
4 days ago
/** no-op */
static markSettleBuyPop(): void {}
1 week ago
4 days ago
/** 不再弹结算商店 */
static popSettleShopPanelIfNeeded(): boolean {
return false;
3 weeks ago
}
4 days ago
/** no-op */
static tryPopLotteryAfterBuyClose(): void {}
3 weeks ago
4 days ago
/** no-op */
static syncGmForceCarry(): void {}
3 weeks ago
4 days ago
static getSlotCaps(): { active: number; passive: number } {
return { active: DAILY_SHOP_ACTIVE_SLOTS, passive: DAILY_SHOP_PASSIVE_SLOTS };
3 weeks ago
}
4 days ago
static getOffers(): never[] {
return [];
3 weeks ago
}
static getActiveSlotIds(): number[] {
4 days ago
return [];
3 weeks ago
}
4 days ago
static getPassiveSlotIds(): number[] {
return [];
3 weeks ago
}
4 days ago
static getOwnedActive(): DailyShopParsed[] {
return [];
3 weeks ago
}
4 days ago
static getOwnedPassive(): DailyShopParsed[] {
return [];
3 weeks ago
}
4 days ago
static getParsed(_id: number): DailyShopParsed | null {
3 weeks ago
return null;
}
4 days ago
static hasUsedShopPurchase(): boolean {
return false;
3 weeks ago
}
static getPendingReplaceGoodsId(): number {
4 days ago
return 0;
3 weeks ago
}
4 days ago
static cancelPendingReplace(): void {}
3 weeks ago
4 days ago
static getOccupiedSlotEntries(_kind: DailyShopKind): never[] {
return [];
1 week ago
}
4 days ago
static removeSlotAt(_kind: DailyShopKind, _slotIndex: number): boolean {
return false;
3 weeks ago
}
4 days ago
static purchase(_goodsId: number, _opts?: { payByAd?: boolean }): { ok: boolean } {
console.warn('[DailyShop] 商店已下线');
return { ok: false };
3 weeks ago
}
4 days ago
static completeReplace(_replaceOwnedId: number): { ok: boolean } {
console.warn('[DailyShop] 商店已下线');
return { ok: false };
3 weeks ago
}
4 days ago
static purchaseLottery(_id: number): { ok: boolean } {
console.warn('[DailyShop] 商店已下线');
return { ok: false };
3 weeks ago
}
4 days ago
static rollOpenBuffs(_count: number): number[] {
return [];
3 weeks ago
}
4 days ago
static purchaseOpen(_id: number, _opts?: { payByAd?: boolean }): { ok: boolean } {
console.warn('[DailyShop] 商店已下线');
return { ok: false };
3 weeks ago
}
4 days ago
static getLotteryPoolSlots(): number[] {
return [];
3 weeks ago
}
4 days ago
static rollLotteryWinnerId(): number {
return 0;
3 weeks ago
}
4 days ago
static hasUsedLotteryPurchase(): boolean {
return false;
3 weeks ago
}
4 days ago
static gmResetShopAndLotteryKeepCarry(): void {
console.warn('[DailyShop] 商店已下线');
3 weeks ago
}
4 days ago
static gmClearCarriedBuffs(): void {
// 延迟引用,避免与 CarryStore 启动顺序纠缠
const { BattleBuffCarryStore } = require('./battleBuff/BattleBuffCarryStore') as typeof import('./battleBuff/BattleBuffCarryStore');
BattleBuffCarryStore.clear();
3 weeks ago
}
/**
4 days ago
* GM:向本机 CarryStore 追加 buff。
* @param _kind 忽略(一律 append)
* @param rawId Battlebuff.id
3 weeks ago
*/
4 days ago
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 };
3 weeks ago
}
}