Moved network ids to constants, improved some entity methods, more performance

This commit is contained in:
Shoghi Cervantes
2015-05-30 23:59:24 +02:00
parent 32680843fa
commit 9e14435dbb
58 changed files with 197 additions and 436 deletions

View File

@ -220,7 +220,7 @@ class Network{
try{
while($offset < $len){
if(($pk = $this->getPacket(ord($str{$offset++}))) !== null){
if($pk->pid() === Info::BATCH_PACKET){
if($pk::NETWORK_ID === Info::BATCH_PACKET){
throw new \InvalidStateException("Invalid BatchPacket inside BatchPacket");
}
$pk->setBuffer($str, $offset);