private void handleFineIncurredEvent(FineIncurredEvent @event) { if (@event.timestamp > updateDat) { updateDat = @event.timestamp; _handleFineIncurredEvent(@event); writeRecord(); } }
private void handleFineIncurredEvent(FineIncurredEvent @event) { if (@event.timestamp > updateDat || (@event.timestamp == updateDat && [email protected])) { updateDat = @event.timestamp; _handleFineIncurredEvent(@event); writeRecord(); } }
private void _handleFineIncurredEvent(FineIncurredEvent @event) { int shipId = EDDI.Instance?.CurrentShip?.LocalId ?? 0; Crime crime = Crime.FromEDName(@event.crimetype); string currentSystem = EDDI.Instance?.CurrentStarSystem?.systemname; FactionReport report = new FactionReport(@event.timestamp, false, shipId, crime, currentSystem, @event.fine) { station = EDDI.Instance?.CurrentStation?.name, body = EDDI.Instance?.CurrentStellarBody?.bodyname, victim = @event.victim }; FactionRecord record = GetRecordWithFaction(@event.faction) ?? AddRecord(@event.faction); AddCrimeToRecord(record, report); }