更新AB商城最终版
This commit is contained in:
@@ -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}`;
|
||||
|
||||
Reference in New Issue
Block a user