Implemented Channeled packet sending

This commit is contained in:
Shoghi Cervantes
2015-04-14 18:24:40 +02:00
parent bb945446b7
commit 0b176b3fe0
29 changed files with 170 additions and 120 deletions

View File

@ -25,6 +25,7 @@ use pocketmine\entity\Entity;
use pocketmine\event\entity\EntityInventoryChangeEvent;
use pocketmine\event\inventory\InventoryOpenEvent;
use pocketmine\item\Item;
use pocketmine\network\Network;
use pocketmine\network\protocol\ContainerSetContentPacket;
use pocketmine\network\protocol\ContainerSetSlotPacket;
use pocketmine\Player;
@ -412,7 +413,7 @@ abstract class BaseInventory implements Inventory{
continue;
}
$pk->windowid = $id;
$player->dataPacket($pk);
$player->dataPacket($pk->setChannel(Network::CHANNEL_WORLD_EVENTS));
}
}
@ -435,7 +436,7 @@ abstract class BaseInventory implements Inventory{
continue;
}
$pk->windowid = $id;
$player->dataPacket($pk);
$player->dataPacket($pk->setChannel(Network::CHANNEL_WORLD_EVENTS));
}
}