This reverts commit 179cb50557.
This commit is contained in:
parent
179cb50557
commit
c2ecc76457
588 changed files with 16260 additions and 10926 deletions
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Menus
|
||||
namespace Server.Menus.ItemLists
|
||||
{
|
||||
public class ItemListEntry
|
||||
{
|
||||
|
|
@ -40,7 +40,8 @@ namespace Server.Menus
|
|||
|
||||
public class ItemListMenu : IMenu
|
||||
{
|
||||
private static Serial m_NextSerial;
|
||||
private static int m_NextSerial;
|
||||
private int m_Serial;
|
||||
|
||||
public ItemListMenu(string question, ItemListEntry[] entries)
|
||||
{
|
||||
|
|
@ -49,18 +50,18 @@ namespace Server.Menus
|
|||
|
||||
do
|
||||
{
|
||||
Serial = m_NextSerial++;
|
||||
Serial &= 0x7FFFFFFF;
|
||||
} while (Serial == 0);
|
||||
m_Serial = m_NextSerial++;
|
||||
m_Serial &= 0x7FFFFFFF;
|
||||
} while (m_Serial == 0);
|
||||
|
||||
Serial |= 0x80000000;
|
||||
m_Serial = (int)((uint)m_Serial | 0x80000000);
|
||||
}
|
||||
|
||||
public string Question{ get; }
|
||||
|
||||
public ItemListEntry[] Entries{ get; set; }
|
||||
|
||||
public Serial Serial { get; private set; }
|
||||
int IMenu.Serial => m_Serial;
|
||||
|
||||
int IMenu.EntryLength => Entries.Length;
|
||||
|
||||
|
|
@ -75,7 +76,7 @@ namespace Server.Menus
|
|||
public void SendTo(NetState state)
|
||||
{
|
||||
state.AddMenu(this);
|
||||
Packets.SendDisplayItemListMenu(state, this);
|
||||
state.Send(new DisplayItemListMenu(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue