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); this.addSkill(skillid);
}); });
if(this._halos.length > 0){ this._owner.onHaloAdd(this, false);
this._owner.onHaloAdd(this, false);
}
this.born(param); this.born(param);
}; };

View File

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