Some protocol changes for 1.1.0.0

This commit is contained in:
Dylan K. Taylor
2017-04-01 19:20:30 +01:00
parent e47c7ea55f
commit 9c25ec3afd
13 changed files with 61 additions and 54 deletions

View File

@ -32,7 +32,6 @@ abstract class ContainerInventory extends BaseInventory{
$pk = new ContainerOpenPacket();
$pk->windowid = $who->getWindowId($this);
$pk->type = $this->getType()->getNetworkType();
$pk->slots = $this->getSize();
$holder = $this->getHolder();
if($holder instanceof Vector3){
$pk->x = $holder->getX();

View File

@ -401,6 +401,7 @@ class PlayerInventory extends BaseInventory{
$pk2 = new ContainerSetContentPacket();
$pk2->windowid = ContainerSetContentPacket::SPECIAL_ARMOR;
$pk2->slots = $armor;
$pk2->targetEid = $player->getId();
$player->dataPacket($pk2);
}else{
$player->dataPacket($pk);
@ -490,6 +491,7 @@ class PlayerInventory extends BaseInventory{
continue;
}
$pk->windowid = $id;
$pk->targetEid = $player->getId(); //TODO: check if this is correct
$player->dataPacket(clone $pk);
}
}
@ -502,6 +504,7 @@ class PlayerInventory extends BaseInventory{
$pk->slots[$i] = clone $item;
}
}
$pk->targetEid = $this->getHolder()->getId();
$this->getHolder()->dataPacket($pk);
}