better(?) way to handle eid translation, local eid 0 is not used now, some additional fixes

This commit is contained in:
GameHerobrine 2025-06-29 03:12:24 +03:00
parent 62819f8b12
commit 21f8796e89
32 changed files with 345 additions and 56 deletions

View file

@ -38,5 +38,13 @@ class UseItemPacket extends RakNetDataPacket{
public function encode(){
}
public function eidsToGlobal(Player $p){
if($this->localEids){
$this->localEids = false;
$this->eid = $p->local2GlobalEID[$this->eid] ?? false;
if($this->eid === false) return false;
}
return true;
}
}