Remove redundant count() for effects ticking

This commit is contained in:
Dylan K. Taylor 2017-11-22 19:44:22 +00:00
parent e9951b1b1f
commit c5ac6a7606

View File

@ -484,7 +484,6 @@ abstract class Living extends Entity implements Damageable{
} }
protected function doEffectsTick(int $tickDiff = 1){ protected function doEffectsTick(int $tickDiff = 1){
if(count($this->effects) > 0){
foreach($this->effects as $effect){ foreach($this->effects as $effect){
if($effect->canTick()){ if($effect->canTick()){
$effect->applyEffect($this); $effect->applyEffect($this);
@ -498,7 +497,6 @@ abstract class Living extends Entity implements Damageable{
} }
} }
} }
}
protected function dealFireDamage(){ protected function dealFireDamage(){
if(!$this->hasEffect(Effect::FIRE_RESISTANCE)){ if(!$this->hasEffect(Effect::FIRE_RESISTANCE)){