导表
This commit is contained in:
parent
50c2d81d3c
commit
2e19b6c17f
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;
|
||||
};
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user