// called by engine bool RaiseGlobalInvite(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 CritterGlobalInviteEventArgs(this, car, encounter_descriptor, combat_mode) { MapId = map_id, HexX = hx, HexY = hy, Dir = (Direction)dir }; GlobalInvite(this, e); // extract (only if some handler intercepted) if (e.Prevent) { map_id = e.MapId; hx = e.HexX; hy = e.HexY; dir = (byte)e.Dir; } return(e.Prevent); } return(false); }
// called by engine bool RaiseGlobalInvite(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 CritterGlobalInviteEventArgs(this, car, encounter_descriptor, combat_mode) { MapId = map_id, HexX = hx, HexY = hy, Dir = (Direction)dir }; GlobalInvite(this, e); // extract (only if some handler intercepted) if (e.Prevent) { map_id = e.MapId; hx = e.HexX; hy = e.HexY; dir = (byte)e.Dir; } return e.Prevent; } return false; }