Fixed armor not dropping (#1962)

This commit is contained in:
Muqsit
2018-01-25 00:01:32 +04:00
committed by Dylan K. Taylor
parent 4a4900e5e7
commit 6c71b443e8
2 changed files with 7 additions and 1 deletions

View File

@ -613,7 +613,10 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
}
public function getDrops() : array{
return $this->inventory !== null ? array_values($this->inventory->getContents()) : [];
return array_merge(
$this->inventory !== null ? array_values($this->inventory->getContents()) : [],
$this->armorInventory !== null ? array_values($this->armorInventory->getContents()) : []
);
}
public function saveNBT(){