Reset player's armors after death

This commit is contained in:
Michael Yoo 2013-11-09 20:43:06 +10:30
parent df01e92ab6
commit 3498c876df

View File

@ -167,6 +167,15 @@ class Entity extends Position{
$inv[] = array($slot->getID(), $slot->getMetadata(), $slot->count);
}
}
for($re = 0; $re < 3; $re++)
{
//TODO: Test this.
$slot = $this->player->getArmor($re);
$this->player->setArmor($re, BlockAPI::getItem(AIR, 0, 0));
if($slot->getID() !== AIR and $slot->count > 0){
$inv[] = array($slot->getID(), $slot->getMetadata(), $slot->count);
}
}
return $inv;
}elseif($this->class === ENTITY_OBJECT){
switch($this->type){