Thanks to @Sunch233

This commit is contained in:
yefengeeeeeeeeeee 2025-04-12 18:54:16 +08:00
parent fee80da366
commit 7c8f32d100
2 changed files with 11 additions and 3171 deletions

File diff suppressed because it is too large Load diff

View file

@ -14,7 +14,7 @@ abstract class RakNetDataPacket extends stdClass{
private $offset = 0;
public $PROTOCOL = 14;
public $PROTOCOL = ProtocolInfo::CURRENT_PROTOCOL;
abstract public function encode();
@ -39,6 +39,14 @@ abstract class RakNetDataPacket extends stdClass{
abstract public function pid();
public function getInternalPid() : int{
$rawProtocol = $this->PROTOCOL;
$this->PROTOCOL = ProtocolInfo::CURRENT_PROTOCOL;
$pid = (int) $this->pid();
$this->PROTOCOL = $rawProtocol;
return $pid;
}
protected function getLong($unsigned = false){
return Utils::readLong($this->get(8), $unsigned);
}