예제 #1
0
        void MonitorInventory(object sender, InventoryChangedEventArgs e)
        {
            Player parent = (sender as Inventory).Parent as Player;

            if (parent == null)
            {
                return;
            }
            parent.CancelTrade();
        }
예제 #2
0
 public Item this[int index]
 {
     get { return(items[index]); }
     set
     {
         if (items[index] != value)
         {
             var e = new InventoryChangedEventArgs(index, items[index], value);
             items[index] = value;
             if (InventoryChanged != null)
             {
                 InventoryChanged(this, e);
             }
         }
     }
 }
예제 #3
0
        void MonitorInventory(object sender, InventoryChangedEventArgs e)
        {
            Player parent = (sender as Inventory).Parent as Player;

            parent?.CancelTrade();
        }