Example #1
0
        private void _handleBondAwardedEvent(BondAwardedEvent @event)
        {
            int    shipId        = EDDI.Instance?.CurrentShip?.LocalId ?? 0;
            string currentSystem = EDDI.Instance?.CurrentStarSystem?.systemname;

            // Get the victim faction data
            Faction faction = DataProviderService.GetFactionByName(@event.victimfaction);

            FactionReport report = new FactionReport(@event.timestamp, false, shipId, Crime.None, currentSystem, @event.reward)
            {
                station          = EDDI.Instance?.CurrentStation?.name,
                body             = EDDI.Instance?.CurrentStellarBody?.bodyname,
                victim           = @event.victimfaction,
                victimAllegiance = (faction?.Allegiance ?? Superpower.None).invariantName
            };

            FactionRecord record = GetRecordWithFaction(@event.awardingfaction);

            if (record == null)
            {
                record = AddRecord(@event.awardingfaction);
            }
            record.factionReports.Add(report);
            record.claims += @event.reward;
        }
Example #2
0
 private void handleBondAwardedEvent(BondAwardedEvent @event)
 {
     if (@event.timestamp > updateDat)
     {
         updateDat = @event.timestamp;
         _handleBondAwardedEvent(@event);
         writeRecord();
     }
 }
Example #3
0
 private void handleBondAwardedEvent(BondAwardedEvent @event)
 {
     if (@event.timestamp > updateDat || (@event.timestamp == updateDat && [email protected]))
     {
         updateDat = @event.timestamp;
         _handleBondAwardedEvent(@event);
         writeRecord();
     }
 }