// 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; } } }