fixed packets pid mess

This commit is contained in:
Sunch 2025-04-12 21:23:26 +08:00
parent 23de63394b
commit a5e19bb774
4 changed files with 10 additions and 6 deletions

View file

@ -6,7 +6,9 @@ class ContainerSetContentPacket extends RakNetDataPacket{
public $hotbar = array();
public function pid(){
if($this->PROTOCOL < ProtocolInfo12::CURRENT_PROTOCOL_12){
if($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
return ProtocolInfo7::CONTAINER_SET_CONTENT_PACKET;
}elseif($this->PROTOCOL < ProtocolInfo12::CURRENT_PROTOCOL_12){
return ProtocolInfo9::CONTAINER_SET_CONTENT_PACKET;
}else if($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
return ProtocolInfo12::CONTAINER_SET_CONTENT_PACKET;

View file

@ -6,7 +6,9 @@ class ContainerSetDataPacket extends RakNetDataPacket{
public $value;
public function pid(){
if($this->PROTOCOL < ProtocolInfo12::CURRENT_PROTOCOL_12){
if($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9){
return ProtocolInfo7::CONTAINER_SET_DATA_PACKET;
}elseif($this->PROTOCOL < ProtocolInfo12::CURRENT_PROTOCOL_12){
return ProtocolInfo9::CONTAINER_SET_DATA_PACKET;
}else if($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL){
return ProtocolInfo12::CONTAINER_SET_DATA_PACKET;

View file

@ -10,8 +10,8 @@ class PlaceBlockPacket extends RakNetDataPacket{
public $unknown7 = 0;
public function pid(){
if($this->PROTOCOL < ProtocolInfo9::CURRENT_PROTOCOL_9) {
return ProtocolInfo7::PLACE_BLOCK_PACKET;
if($this->PROTOCOL < ProtocolInfo::CURRENT_PROTOCOL) {
return ProtocolInfo12::PLACE_BLOCK_PACKET;
}
return ProtocolInfo::PLACE_BLOCK_PACKET;
}