From 822adcae2d701b538b35db00e65f58f3baa8f273 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Thu, 28 Mar 2013 16:56:50 +0100 Subject: [PATCH] Packet Cleaning --- src/constants/ProtocolInfo.php | 2 -- src/network/Packet.php | 14 -------------- 2 files changed, 16 deletions(-) diff --git a/src/constants/ProtocolInfo.php b/src/constants/ProtocolInfo.php index 83d6fde47..92977403d 100644 --- a/src/constants/ProtocolInfo.php +++ b/src/constants/ProtocolInfo.php @@ -326,8 +326,6 @@ class Protocol{ "customData", ), - - 0xa0 => array( "special1", ), diff --git a/src/network/Packet.php b/src/network/Packet.php index fbd14865f..e4bbd5c44 100644 --- a/src/network/Packet.php +++ b/src/network/Packet.php @@ -135,20 +135,10 @@ class Packet{ case "short": $this->addRaw(Utils::writeShort($this->data[$field])); break; - case "byteArray": - $this->addRaw($this->data[$field]); - break; case "string": $this->addRaw(Utils::writeShort(strlen($this->data[$field]))); $this->addRaw($this->data[$field]); break; - case "slotData": - $this->addRaw(Utils::writeShort($this->data[$field][0])); - if($this->data[$field][0]!=-1){ - $this->addRaw(Utils::writeByte($this->data[$field][1])); - $this->addRaw(Utils::writeShort($this->data[$field][2])); - } - break; default: $this->addRaw(Utils::writeByte($this->data[$field])); break; @@ -173,7 +163,6 @@ class Packet{ } public function parse(){ - $continue = true; foreach($this->struct as $field => $type){ if(is_int($type)){ $this->data[] = $this->get($type); @@ -247,9 +236,6 @@ class Packet{ $this->data[] = Utils::readBool($this->get(1)); break; } - if($continue === false){ - break; - } } }