后台:跳主线功能
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// 关卡表
|
||||
import {decodeArrayListStr, decodeArrayStr, parseNumberList, readFileAndParse} from '../util'
|
||||
import { WAR_RELATE_TABLES, WAR_TYPE } from '../../consts';
|
||||
|
||||
import { isString } from 'underscore'
|
||||
export interface DicWar {
|
||||
|
||||
// 关卡id
|
||||
@@ -40,6 +40,10 @@ export interface DicWar {
|
||||
readonly mapseid: number[];
|
||||
// 秘境类型
|
||||
readonly movePoint: number;
|
||||
// 战前剧本
|
||||
readonly scriptBefore: string;
|
||||
// 战后剧本
|
||||
readonly scriptAfter: string;
|
||||
}
|
||||
|
||||
export const dicWar = new Map<number, DicWar>();
|
||||
@@ -60,6 +64,16 @@ export function loadWar() {
|
||||
o.teammateReward = parseFixReward(o.teammateReward);
|
||||
o.fobiddenCharactor = parseForbiddenChara(o.fobiddenCharactor);
|
||||
o.mapseid = parseNumberList(o.mapseid);
|
||||
if(o.script_id && isString(o.script_id)) {
|
||||
let scripts = o.script_id?.split('&')||[];
|
||||
for(let script of scripts) {
|
||||
if(script.indexOf('R_') != -1) {
|
||||
o.scriptBefore = script;
|
||||
} else if (script.indexOf('RE_') != -1) {
|
||||
o.scriptAfter = script;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dicWar.set(o.war_id, o);
|
||||
if(o.warType == WAR_TYPE.PVP) {
|
||||
|
||||
Reference in New Issue
Block a user