This commit is contained in:
Shoghi Cervantes Pueyo
2012-12-20 19:35:31 +01:00
parent fae7fae8ec
commit aa8dc63cc5
4 changed files with 70 additions and 31 deletions

View File

@ -428,9 +428,9 @@ class CustomPacketHandler{
$this->data["unknown3"] = Utils::readFloat($this->get(4));
$this->data["unknown4"] = Utils::readFloat($this->get(4));
}else{
$this->raw .= Utils::writeByte($this->data["action"]);
/*$this->raw .= Utils::writeByte($this->data["action"]);
$this->raw .= Utils::writeInt($this->data["eid"]);
$this->raw .= Utils::writeInt($this->data["target"]);
$this->raw .= Utils::writeInt($this->data["target"]);*/
}
break;
case MC_SET_ENTITY_DATA:
@ -479,6 +479,23 @@ class CustomPacketHandler{
$this->raw .= Utils::writeShort(strlen($this->data["message"])).$this->data["message"];
}
break;
case MC_SIGN_UPDATE:
if($this->c === false){
$this->data["x"] = Utils::readShort($this->get(2));
$this->data["y"] = ord($this->get(1));
$this->data["z"] = Utils::readShort($this->get(2));
for($i = 0; $i < 4; ++$i){
$this->data["line$i"] = $this->get(Utils::readLShort($this->get(2), false));
}
}else{
$this->raw .= Utils::writeShort($this->data["x"]);
$this->raw .= chr($this->data["y"]);
$this->raw .= Utils::writeShort($this->data["z"]);
for($i = 0; $i < 4; ++$i){
$this->raw .= Utils::writeLShort(strlen($this->data["line$i"])).$this->data["line$i"];
}
}
break;
}
}