Clean up inventory auto close mess from PM3

on PM3 there was no concept of 'current window', we had no idea which window the player was actually looking at.
This commit is contained in:
Dylan K. Taylor
2021-11-08 23:51:25 +00:00
parent 5be429a8c4
commit c7beb0a702
2 changed files with 6 additions and 8 deletions

View File

@@ -193,7 +193,7 @@ class InGamePacketHandler extends PacketHandler{
//TODO HACK: EATING_ITEM is sent back to the server when the server sends it for other players (1.14 bug, maybe earlier)
return $packet->actorRuntimeId === ActorEvent::EATING_ITEM;
}
$this->player->doCloseInventory();
$this->player->removeCurrentWindow();
switch($packet->eventId){
case ActorEvent::EATING_ITEM: //TODO: ignore this and handle it server-side
@@ -570,8 +570,6 @@ class InGamePacketHandler extends PacketHandler{
}
public function handleContainerClose(ContainerClosePacket $packet) : bool{
$this->player->doCloseInventory();
$this->inventoryManager->onClientRemoveWindow($packet->windowId);
return true;
}