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); } }
internal void AssociateInterface(Interface iface) { iface.PacketHandler = PacketHandler; }