Parameters for GlobalInvite event, the values are used only if marked as successful.
Every handler should check Success property of this object, so that only one succeeds.
Inheritance: SuccessEventArgs
Exemple #1
0
 // called by engine
 static void RaiseGlobalInvite(Critter cr, Item car, uint encounter_descriptor, int combat_mode,
                               ref uint map_id, ref ushort hx, ref ushort hy, ref byte dir)
 {
     if (GlobalInvite != null)
     {
         var e = new GlobalInviteEventArgs(cr, car, encounter_descriptor, (CombatMode)combat_mode);
         GlobalInvite(null, e);
         // extract values if we succeeded
         if (e.Success)
         {
             map_id = e.MapId;
             hx     = e.HexX;
             hy     = e.HexY;
             dir    = (byte)e.Dir;
         }
     }
 }
Exemple #2
0
 // called by engine
 static void RaiseGlobalInvite(Critter cr, Item car, uint encounter_descriptor, int combat_mode,
     ref uint map_id, ref ushort hx, ref ushort hy, ref byte dir)
 {
     if (GlobalInvite != null) {
         var e = new GlobalInviteEventArgs(cr, car, encounter_descriptor, (CombatMode)combat_mode);
         GlobalInvite(null, e);
         // extract values if we succeeded
         if (e.Success) {
             map_id = e.MapId;
             hx = e.HexX;
             hy = e.HexY;
             dir = (byte)e.Dir;
         }
     }
 }