导表
This commit is contained in:
parent
4e7df43d90
commit
aa39fd5f4c
File diff suppressed because one or more lines are too long
1
config/npcteam_tbl.json
Normal file
1
config/npcteam_tbl.json
Normal file
File diff suppressed because one or more lines are too long
35
src/cfg/parsers/NpcTeamCfg.ts
Normal file
35
src/cfg/parsers/NpcTeamCfg.ts
Normal file
@ -0,0 +1,35 @@
|
||||
import {Cfg} from "../../common/DataParser";
|
||||
|
||||
export class NpcTeamCfg implements Cfg{
|
||||
name: "NpcTeamCfg";
|
||||
|
||||
public id: number;
|
||||
public teamheroid: number;
|
||||
public difficultyid: number;
|
||||
public weightid: number;
|
||||
public entourage1id: number;
|
||||
public entourage2id: number;
|
||||
public entourage3id: number;
|
||||
public entourage4id: number;
|
||||
|
||||
public decode(data: any) {
|
||||
this.id = data.id;
|
||||
this.teamheroid = data.teamheroid;
|
||||
this.difficultyid = data.difficultyid;
|
||||
this.weightid = data.weightid;
|
||||
this.entourage1id = data.entourage1id;
|
||||
this.entourage2id = data.entourage2id;
|
||||
this.entourage3id = data.entourage3id;
|
||||
this.entourage4id = data.entourage4id;
|
||||
};
|
||||
|
||||
public isOK (uniqueID: number, param1: any, param2: any): boolean {
|
||||
if((param1 == undefined || param1 == null) && (param2 == undefined || param2 == null)){
|
||||
return this.id == uniqueID;
|
||||
}
|
||||
if(param2 == undefined || param2 == null){
|
||||
return this.id == uniqueID && this.id == param1;
|
||||
}
|
||||
return this.id == uniqueID && this.id == param1 && this.id == param2;
|
||||
};
|
||||
};
|
@ -506,7 +506,7 @@ export class BattleHandler {
|
||||
debugRoom(`[beginFlow]${step}|${this._flowcount}`);
|
||||
};
|
||||
|
||||
public endFlow(step: string){
|
||||
public endFlow(step: string, manualdelay: number = 100){
|
||||
let res = this._flowcount - 1;
|
||||
if(res < 0){
|
||||
debugRoom(`[endFlow]${step}[error flowcount]${this._flowcount}`);
|
||||
@ -542,7 +542,7 @@ export class BattleHandler {
|
||||
}
|
||||
this._flowcount = res;
|
||||
|
||||
let dt = 100; // 延时100ms开始下个步骤
|
||||
let dt = manualdelay; // 延时100ms开始下个步骤
|
||||
return nt + dt;
|
||||
}
|
||||
|
||||
@ -952,7 +952,7 @@ export class BattleHandler {
|
||||
ph.onRoundWin();
|
||||
// this.checkPets();
|
||||
|
||||
return this.endFlow('onPlayerRoundWin');
|
||||
return this.endFlow('onPlayerRoundWin', 1000);
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user