mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-12 12:55:21 +00:00
Handle all kind of unknown data packets
This commit is contained in:
parent
f255948eb6
commit
0ff647015c
@ -180,9 +180,17 @@ class RakNetParser{
|
|||||||
if($length <= 0
|
if($length <= 0
|
||||||
or $orderChannel >= 32
|
or $orderChannel >= 32
|
||||||
or ($hasSplit === true and $splitIndex >= $splitCount)){
|
or ($hasSplit === true and $splitIndex >= $splitCount)){
|
||||||
return false;
|
$data = new UnknownPacket();
|
||||||
}
|
$data->reliability = $reliability;
|
||||||
|
$data->hasSplit = $hasSplit;
|
||||||
|
$data->messageIndex = $messageIndex;
|
||||||
|
$data->orderIndex = $orderIndex;
|
||||||
|
$data->orderChannel = $orderChannel;
|
||||||
|
$data->splitCount = $splitCount;
|
||||||
|
$data->splitID = $splitID;
|
||||||
|
$data->splitIndex = $splitIndex;
|
||||||
|
$data->setBuffer($this->get($length));
|
||||||
|
}else{
|
||||||
$pid = $this->getByte();
|
$pid = $this->getByte();
|
||||||
if(isset(ProtocolInfo::$packets[$pid])){
|
if(isset(ProtocolInfo::$packets[$pid])){
|
||||||
$data = new ProtocolInfo::$packets[$pid];
|
$data = new ProtocolInfo::$packets[$pid];
|
||||||
@ -199,6 +207,7 @@ class RakNetParser{
|
|||||||
$data->splitID = $splitID;
|
$data->splitID = $splitID;
|
||||||
$data->splitIndex = $splitIndex;
|
$data->splitIndex = $splitIndex;
|
||||||
$data->setBuffer($this->get($length - 1));
|
$data->setBuffer($this->get($length - 1));
|
||||||
|
}
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user