mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
26 lines
No EOL
693 B
PHP
26 lines
No EOL
693 B
PHP
<?php
|
|
|
|
class MessagePacket extends RakNetDataPacket{
|
|
public $source;
|
|
public $message;
|
|
|
|
public function pid(){
|
|
return ProtocolInfo::MESSAGE_PACKET;
|
|
}
|
|
|
|
public function decode(){
|
|
if($this->PROTOCOL > ProtocolInfo9::CURRENT_PROTOCOL_9){ //0.6.1 and below From NostalgiaCore-BackPort Author:Gameherobrine
|
|
$this->source = $this->getString();
|
|
}
|
|
$this->message = $this->getString();
|
|
}
|
|
|
|
public function encode(){
|
|
$this->reset();
|
|
if($this->PROTOCOL > ProtocolInfo9::CURRENT_PROTOCOL_9){ //0.6.1 and below From NostalgiaCore-BackPort Author:Gameherobrine
|
|
$this->putString($this->source);
|
|
}
|
|
$this->putString($this->message);
|
|
}
|
|
|
|
} |