Updated Position to use Weak / strong references for Level objects

This commit is contained in:
Shoghi Cervantes
2014-05-22 04:14:06 +02:00
parent 6328834681
commit c1546aac9c
60 changed files with 584 additions and 291 deletions

View File

@ -65,7 +65,7 @@ trait Container{
$slots = array();
if(is_array($player->windows[$id])){
$all = $this->level->getPlayers();
$all = $this->getLevel()->getPlayers();
foreach($player->windows[$id] as $ob){
$pk = new TileEventPacket();
$pk->x = $ob->x;
@ -90,7 +90,7 @@ trait Container{
$pk->z = $this->z;
$pk->case1 = 1;
$pk->case2 = 2;
Player::broadcastPacket($this->level->getPlayers(), $pk);
Player::broadcastPacket($this->getLevel()->getPlayers(), $pk);
for($s = 0; $s < Chest::SLOTS; ++$s){
$slot = $this->getSlot($s);
if($slot->getID() > Item::AIR and $slot->getCount() > 0){