petinfo新增字段处理
This commit is contained in:
parent
00e0aeff48
commit
b1fc28db0d
@ -56,6 +56,9 @@ export class PetHandler {
|
||||
|
||||
_hasreborned: boolean = false;
|
||||
|
||||
_orignEffCnt: number = 0;
|
||||
_orignCardPoint: number = 0;
|
||||
|
||||
public init(apet: Pet, owner: PlayerHandler, index: number){
|
||||
this._pet = apet;
|
||||
this._owner = owner;
|
||||
@ -72,6 +75,11 @@ export class PetHandler {
|
||||
this._exredhurt = this._cfg.defense / 100;
|
||||
this._enmagic = this._cfg.spell_power;
|
||||
|
||||
if(param){
|
||||
this._orignCardPoint = param.cardpoint;
|
||||
this._orignEffCnt = param.edd_cnt;
|
||||
}
|
||||
|
||||
if(!param || !param.cardpoint){
|
||||
this._baseap = this._cfg.powernum;
|
||||
}else{
|
||||
@ -456,19 +464,7 @@ export class PetHandler {
|
||||
};
|
||||
|
||||
public exportInfoMsg(): PetInfoMsg{
|
||||
let obj = new PetInfoMsg({
|
||||
id: this._id,
|
||||
isHero: this._isHero,
|
||||
ap: this._I(this._baseap),
|
||||
extAp: this._I(this.getEffHaloV()),
|
||||
pos: this._idx,
|
||||
player: this._owner.getId(),
|
||||
harmReduce: this._exredhurt,
|
||||
skills: this._selfskills,
|
||||
extSkills: this.getExSkills(),
|
||||
em: this._enmagic,
|
||||
silence: this._silentCD
|
||||
});
|
||||
let obj = new PetInfoMsg(this.exportInfo());
|
||||
return obj;
|
||||
};
|
||||
|
||||
@ -482,17 +478,19 @@ export class PetHandler {
|
||||
|
||||
public exportInfo(): PetInfo{
|
||||
let obj = new PetInfo();
|
||||
obj.id = this._id,
|
||||
obj.isHero = this._isHero,
|
||||
obj.ap = this._I(this._baseap),
|
||||
obj.extAp = this._I(this.getEffHaloV()),
|
||||
obj.pos = this._idx,
|
||||
obj.player = this._owner.getId(),
|
||||
obj.harmReduce = this._exredhurt,
|
||||
obj.skills = this._selfskills,
|
||||
obj.extSkills = this.getExSkills(),
|
||||
obj.em = this._enmagic,
|
||||
obj.silence = this._silentCD
|
||||
obj.id = this._id;
|
||||
obj.isHero = this._isHero;
|
||||
obj.ap = this._I(this._baseap);
|
||||
obj.extAp = this._I(this.getEffHaloV());
|
||||
obj.pos = this._idx;
|
||||
obj.player = this._owner.getId();
|
||||
obj.harmReduce = this._exredhurt;
|
||||
obj.skills = this._selfskills;
|
||||
obj.extSkills = this.getExSkills();
|
||||
obj.em = this._enmagic;
|
||||
obj.silence = this._silentCD;
|
||||
obj.effectCount = this._orignEffCnt;
|
||||
obj.point = this._orignCardPoint;
|
||||
return obj;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user