diff --git a/RedeemVoucherEntry.cs b/RedeemVoucherEntry.cs index f76e2e7..5504142 100644 --- a/RedeemVoucherEntry.cs +++ b/RedeemVoucherEntry.cs @@ -12,10 +12,15 @@ namespace EDJournal { if (factions != null) { foreach (JObject faction in factions.Children()) { string faction_name = faction.Value("Faction"); + long faction_bounty = faction.Value("Amount") ?? 0; if (faction_name == null || faction_name.Length <= 0) { continue; } Factions.Add(faction_name); + if (!FactionBounties.ContainsKey(faction_name)) { + FactionBounties[faction_name] = 0; + } + FactionBounties[faction_name] += faction_bounty; } } @@ -29,5 +34,6 @@ namespace EDJournal { public int Amount { get; set; } = 0; public string Type { get; set; } = "Bounty"; public List Factions { get; set; } = new List(); + public Dictionary FactionBounties { get; set; } = new Dictionary(); } }