Esempio n. 1
0
        // called by engine
        static bool RaiseCritterStealing(Critter cr, Critter thief, Item item, int count)
        {
            GlobalCritterStealingEventArgs e = null;

            if (CritterStealing != null)
            {
                e = new GlobalCritterStealingEventArgs(cr, thief, item, count);
                CritterStealing(null, e);
            }
            return(e != null ? e.Success : GlobalCritterStealingEventArgs.Default);
        }
Esempio n. 2
0
 // called by engine
 static bool RaiseCritterStealing(Critter cr, Critter thief, Item item, int count)
 {
     GlobalCritterStealingEventArgs e = null;
     if (CritterStealing != null) {
         e = new GlobalCritterStealingEventArgs(cr, thief, item, count);
         CritterStealing(null, e);
     }
     return e != null ? e.Success : GlobalCritterStealingEventArgs.Default;
 }