Inheritance: SuccessEventArgs
Example #1
0
        // called by engine
        static bool RaiseItemsBarter(IntPtr sale_items, IntPtr sale_items_count, IntPtr buy_items, IntPtr buy_items_count, Critter player, Critter npc)
        {
            ItemsBarterEventArgs e = null;

            if (ItemsBarter != null)
            {
                e = new ItemsBarterEventArgs(new ItemArray(sale_items), new UIntArray(sale_items_count),
                                             new ItemArray(buy_items), new UIntArray(buy_items_count),
                                             player, npc);
                ItemsBarter(null, e);
            }
            return(e != null ? e.Success : ItemsBarterEventArgs.Default);
        }
Example #2
0
 // called by engine
 static bool RaiseItemsBarter(IntPtr sale_items, IntPtr sale_items_count, IntPtr buy_items, IntPtr buy_items_count, Critter player, Critter npc)
 {
     ItemsBarterEventArgs e = null;
     if (ItemsBarter != null) {
         e = new ItemsBarterEventArgs(new ItemArray(sale_items), new UIntArray(sale_items_count),
             new ItemArray(buy_items), new UIntArray(buy_items_count),
             player, npc);
         ItemsBarter(null, e);
     }
     return e != null ? e.Success : ItemsBarterEventArgs.Default;
 }