更新AB商城最终版

This commit is contained in:
COMPUTER\EDY
2026-09-29 18:57:56 +08:00
parent 7886bbfef5
commit 271cdb53d2
45 changed files with 43561 additions and 24952 deletions
+13
View File
@@ -412,6 +412,19 @@ export class GameConfig {
&& ["B", "2"].includes(String(assignment.group).toUpperCase());
}
static isShopB(): boolean {
const assignments = this.GM_INFO.abTestAssignments || {};
const assignment = assignments.layer_3 || Object.keys(assignments)
.map(key => assignments[key]).find(item => item && Number(item.layer) === 3);
if (assignment) return assignment.enabled !== false
&& ["B", "2"].includes(String(assignment.group).toUpperCase());
return !!this.GM_INFO.abTests && this.GM_INFO.abTests.layer_three === 2;
}
static getShopPrefabPath(): string {
return this.isShopB() ? "prefab/shop2" : "prefab/shop";
}
static getLevelConfigPath(level: number, mainline: boolean = true): string {
const folder = mainline && this.isNewPlayerB() && level >= 1 && level <= 50 ? "Json2" : "Json";
return `${folder}/level${level}`;