Improved effects, threading changes

This commit is contained in:
Shoghi Cervantes
2015-04-08 17:31:06 +02:00
parent 76767294bf
commit 71657a2a4e
8 changed files with 73 additions and 19 deletions

View File

@ -180,17 +180,17 @@ class Effect{
public function canTick(){
switch($this->id){
case Effect::POISON:
if(($interval = 25 >> $this->amplifier) > 0){
if(($interval = (25 >> $this->amplifier)) > 0){
return ($this->duration % $interval) === 0;
}
return true;
case Effect::WITHER:
if(($interval = 50 >> $this->amplifier) > 0){
if(($interval = (50 >> $this->amplifier)) > 0){
return ($this->duration % $interval) === 0;
}
return true;
case Effect::REGENERATION:
if(($interval = 40 >> $this->amplifier) > 0){
if(($interval = (40 >> $this->amplifier)) > 0){
return ($this->duration % $interval) === 0;
}
return true;