mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Thanks to @Sunch233
This commit is contained in:
parent
fee80da366
commit
7c8f32d100
2 changed files with 11 additions and 3171 deletions
3172
src/Player.php
3172
src/Player.php
File diff suppressed because it is too large
Load diff
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue