Properly close inventory windows from Players

This commit is contained in:
Shoghi Cervantes
2014-11-27 13:32:07 +01:00
parent 441a98e60a
commit a3e50f6337
4 changed files with 8 additions and 6 deletions

View File

@ -218,7 +218,9 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
$this->getInventory()->close($player);
}
}
$this->inventory = null;
foreach($this->inventory->getViewers() as $viewer){
$viewer->removeWindow($this->inventory);
}
parent::close();
}
}