修订报错问题

This commit is contained in:
yuexin 2020-12-24 17:45:30 +08:00
parent 6f5c3384c4
commit b7c4ad49b7

View File

@ -46,10 +46,10 @@ export class PlayerHandler {
}; };
public clear(bresetAll: boolean = false){ public clear(bresetAll: boolean = false){
this._self = null;
this._pets.forEach((item: PetHandler)=>{ this._pets.forEach((item: PetHandler)=>{
item.clear(bresetAll); item.clear(bresetAll);
}); });
this._self = null;
this._pets.length = 0; this._pets.length = 0;
}; };
@ -326,7 +326,7 @@ export class PlayerHandler {
}; };
public die(){ public die(){
this.clear(); this.clear(true);
//todo: //todo:
}; };
@ -427,7 +427,7 @@ export class PlayerHandler {
} }
}); });
if(this._self != apet){ if(this._self && this._self != apet){
if(this._self.removeEffHalo(apet)){ if(this._self.removeEffHalo(apet)){
lst.push(this._self); lst.push(this._self);
} }