コード例 #1
0
        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
ファイル: Client.cs プロジェクト: RevolutionSmythe/c-raft
 internal void AssociateInterface(Interface iface)
 {
     iface.PacketHandler = PacketHandler;
 }