public InterfaceClickedEventArgs(Interface iface, WindowClickPacket packet)
        {
            this.Interface = iface;
            this.Slot = packet.Slot;
            this.RightClick = packet.RightClick;
            this.Transaction = packet.Transaction;

            if (Slot < 0)
            {
                Slot = 0;
                Location = ClickLocation.Void;
            }
            else if (Slot < Interface.SlotCount)
            {
                Location = ClickLocation.Interface;
            }
            else
            {
                Location = ClickLocation.Inventory;
                Slot = (short)(Slot - Interface.SlotCount + 9);
            }
        }
Пример #2
0
 internal void AssociateInterface(Interface iface)
 {
     iface.PacketHandler = PacketHandler;
 }