void MonitorInventory(object sender, InventoryChangedEventArgs e) { Player parent = (sender as Inventory).Parent as Player; if (parent == null) { return; } parent.CancelTrade(); }
void MonitorInventory(object sender, InventoryChangedEventArgs e) { Player parent = (sender as Inventory).Parent as Player; parent?.CancelTrade(); }