Merge changes from master

This commit is contained in:
Dylan K. Taylor
2017-05-24 09:54:11 +01:00
10 changed files with 67 additions and 38 deletions

View File

@ -50,9 +50,12 @@ class LoginPacket extends DataPacket{
public function decode(){
$this->protocol = $this->getInt();
}
public function decodeAdditional(){
if($this->protocol !== ProtocolInfo::CURRENT_PROTOCOL){
$this->buffer = null;
return; //Do not attempt to decode for non-accepted protocols
}
$this->gameEdition = $this->getByte();
$this->setBuffer($this->getString(), 0);