NostalgiaCore/src/network/protocol/packet/ContainerSetDataPacket.php
2025-05-03 13:27:46 +08:00

36 lines
No EOL
1.1 KiB
PHP

<?php
class ContainerSetDataPacket extends RakNetDataPacket{
public $windowid;
public $property;
public $value;
public function pid(){
if($this->PROTOCOL < ProtocolInfo4::CURRENT_PROTOCOL_4){
return ProtocolInfo3::CONTAINER_SET_DATA_PACKET;
}elseif($this->PROTOCOL < ProtocolInfo6::CURRENT_PROTOCOL_6){
return ProtocolInfo4::CONTAINER_SET_DATA_PACKET;
}elseif($this->PROTOCOL < ProtocolInfo8::CURRENT_PROTOCOL_8){
return ProtocolInfo6::CONTAINER_SET_DATA_PACKET;
}elseif($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
return ProtocolInfo8::CONTAINER_SET_DATA_PACKET;
}elseif($this->PROTOCOL < ProtocolInfo12::CURRENT_PROTOCOL_12){
return ProtocolInfo9::CONTAINER_SET_DATA_PACKET;
}elseif($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
return ProtocolInfo12::CONTAINER_SET_DATA_PACKET;
}
return ProtocolInfo::CONTAINER_SET_DATA_PACKET;
}
public function decode(){
}
public function encode(){
$this->reset();
$this->putByte($this->windowid);
$this->putShort($this->property);
$this->putShort($this->value);
}
}