Improved LoginPacket and BatchPacket handling

This commit is contained in:
Shoghi Cervantes 2015-04-29 10:55:17 +02:00
parent 2cd78d4ae3
commit 11e2d23b83

View File

@ -44,10 +44,11 @@ class LoginPacket extends DataPacket{
$this->username = $this->getString(); $this->username = $this->getString();
$this->protocol1 = $this->getInt(); $this->protocol1 = $this->getInt();
$this->protocol2 = $this->getInt(); $this->protocol2 = $this->getInt();
$this->clientId = $this->getInt();
if($this->protocol1 < 21){ //New fields! if($this->protocol1 < 21){ //New fields!
$this->setBuffer(null, 0); //Skip batch packet handling
return; return;
} }
$this->clientId = $this->getInt();
$this->slim = $this->getByte() > 0; $this->slim = $this->getByte() > 0;
$this->skin = $this->getString(); $this->skin = $this->getString();
} }