Added BaseInventory->removeAllViewers()

This commit is contained in:
Dylan K. Taylor
2017-10-16 11:15:03 +01:00
parent 1641183674
commit 68809d992b
4 changed files with 15 additions and 15 deletions

View File

@ -541,10 +541,7 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
public function close(){
if(!$this->closed){
if($this->inventory !== null){
foreach($this->inventory->getViewers() as $viewer){
$viewer->removeWindow($this->inventory);
}
$this->inventory->removeAllViewers(true);
$this->inventory = null;
}
parent::close();