Fixed Time, Death and more event issues

This commit is contained in:
Shoghi Cervantes Pueyo
2012-12-19 14:23:34 +01:00
parent 11f4096403
commit a833d92d76
6 changed files with 96 additions and 59 deletions

View File

@ -44,7 +44,7 @@ class PlayerAPI{
case "onHealthRegeneration":
$result = $this->server->query("SELECT ip,port FROM players WHERE EID = (SELECT EID FROM entities WHERE health < 20);", true);
if($result !== true and $result !== false){
while($player = $result->fetchArray()){
while(false !== ($player = $result->fetchArray())){
$player->entity->setHealth(min(20, $player->entity->getHealth() + $data), "regeneration");
}
}