mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
Merge branch 'master' into pr
This commit is contained in:
commit
c3a8ecaeb0
359 changed files with 3109 additions and 3222 deletions
|
|
@ -14,7 +14,7 @@ abstract class RakNetDataPacket extends stdClass{
|
|||
|
||||
private $offset = 0;
|
||||
|
||||
public $PROTOCOL = ProtocolInfo::CURRENT_PROTOCOL;
|
||||
public $PROTOCOL = ProtocolInfo::CURRENT_PROTOCOL;
|
||||
|
||||
abstract public function encode();
|
||||
|
||||
|
|
@ -23,11 +23,11 @@ abstract class RakNetDataPacket extends stdClass{
|
|||
public function getBuffer(){
|
||||
return $this->buffer;
|
||||
}
|
||||
|
||||
|
||||
public function getOffset(){
|
||||
return $this->offset;
|
||||
}
|
||||
|
||||
|
||||
public function setBuffer($buffer = ""){
|
||||
$this->buffer = $buffer;
|
||||
$this->offset = 0;
|
||||
|
|
@ -140,12 +140,12 @@ abstract class RakNetDataPacket extends stdClass{
|
|||
protected function getShort($unsigned = false){
|
||||
return Utils::readShort($this->get(2), $unsigned);
|
||||
}
|
||||
|
||||
|
||||
public function getSignedByte(){
|
||||
$b = ord($this->get(1));
|
||||
return $b >= 0x80 ? ($b-256) : $b;
|
||||
return $b >= 0x80 ? ($b - 256) : $b;
|
||||
}
|
||||
|
||||
|
||||
protected function getByte(){
|
||||
return ord($this->get(1));
|
||||
}
|
||||
|
|
@ -161,7 +161,7 @@ abstract class RakNetDataPacket extends stdClass{
|
|||
}
|
||||
|
||||
protected function putByte($v){
|
||||
$this->buffer .= chr((int)$v);
|
||||
$this->buffer .= chr((int) $v);
|
||||
}
|
||||
|
||||
protected function getString(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue