mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-21 00:52:55 +00:00
make native close inv actually send packet oops
This commit is contained in:
parent
16f01fecc0
commit
a80396b7a3
|
|
@ -740,8 +740,8 @@ void __cdecl NativeGetContainerViewerEntityIds(int entityId, int *outIds, int ma
|
|||
void __cdecl NativeCloseContainer(int entityId)
|
||||
{
|
||||
auto player = FindPlayer(entityId);
|
||||
if (player)
|
||||
player->doCloseContainer();
|
||||
if (player && player->containerMenu != player->inventoryMenu)
|
||||
player->closeContainer();
|
||||
}
|
||||
|
||||
void __cdecl NativeOpenVirtualContainer(int entityId, int nativeType, const char *titleUtf8, int titleByteLen, int slotCount, int *itemsBuf)
|
||||
|
|
@ -751,7 +751,7 @@ void __cdecl NativeOpenVirtualContainer(int entityId, int nativeType, const char
|
|||
return;
|
||||
|
||||
if (player->containerMenu != player->inventoryMenu)
|
||||
player->doCloseContainer();
|
||||
player->closeContainer();
|
||||
|
||||
std::wstring title = ServerRuntime::StringUtils::Utf8ToWide(std::string(titleUtf8, titleByteLen));
|
||||
auto container = std::make_shared<VirtualContainer>(nativeType, title, slotCount);
|
||||
|
|
|
|||
Loading…
Reference in a new issue