Updates menu packets (#320)

This commit is contained in:
Kamron Batman 2020-11-17 21:47:00 -08:00 • committed by GitHub
parent ceb8d4ad49
commit 602c14fed7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 260 additions and 228 deletions

View file

@ -1075,19 +1075,7 @@ namespace Server
set
{
m_ContextMenu = value;
if (m_ContextMenu != null && m_NetState != null)
{
// Old packet is preferred until assistants catch up
if (m_NetState.NewHaven && m_ContextMenu.RequiresNewPacket)
{
Send(new DisplayContextMenu(m_ContextMenu));
}
else
{
Send(new DisplayContextMenuOld(m_ContextMenu));
}
}
m_NetState.SendDisplayContextMenu(m_ContextMenu);
}
}