public static void Trigger(InventoryEventType eventType, InventorySlot slot, string targetInventoryName, InventoryItem eventItem, int quantity, int index) { e.InventoryEventType = eventType; e.Slot = slot; e.TargetInventoryName = targetInventoryName; e.EventItem = eventItem; e.Quantity = quantity; e.Index = index; EventManager.TriggerEvent(e); }
public int Index; // the index inside the inventory at which the event happened public InventoryEvent(InventoryEventType eventType, InventorySlot slot, string targetInventoryName, InventoryItem eventItem, int quantity, int index) { InventoryEventType = eventType; Slot = slot; TargetInventoryName = targetInventoryName; EventItem = eventItem; Quantity = quantity; Index = index; }