case break问题

This commit is contained in:
yuexin 2020-12-09 20:56:23 +08:00
parent 3430eab7f2
commit c2c4d4ded6
2 changed files with 6 additions and 3 deletions

View File

@ -72,9 +72,7 @@ export class PetHandler {
this.addSkill(skillid);
});
if(this._halos.length > 0){
this._owner.onHaloAdd(this, false);
}
this._owner.onHaloAdd(this, false);
this.born(param);
};

View File

@ -144,12 +144,17 @@ export class Skill {
switch(this._data.targetid){
case GameUnitType.BATTLEUNIT:
tgok = this.isInRange(srcpet, dstpet);
break;
case GameUnitType.HERO:
tgok = dstpet._isHero;
break;
case GameUnitType.PET:
if(!dstpet._isHero){
tgok = this.isInRange(srcpet, dstpet);
}
break;
default:
break;
}
return tgok;
};