2021-09-28 13:20:59 +02:00
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Globalization;
|
|
|
|
|
using EDJournal;
|
|
|
|
|
|
2021-11-10 21:24:39 +01:00
|
|
|
|
namespace EliteBGS.BGS {
|
2021-09-28 13:20:59 +02:00
|
|
|
|
public class FactionKillBonds : LogEntry {
|
|
|
|
|
public int TotalSum {
|
|
|
|
|
get {
|
|
|
|
|
return Entries
|
|
|
|
|
.OfType<FactionKillBondEntry>()
|
|
|
|
|
.Sum(x => x.Reward)
|
|
|
|
|
;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string VictimFaction {
|
|
|
|
|
get {
|
|
|
|
|
return Entries
|
|
|
|
|
.OfType<FactionKillBondEntry>()
|
|
|
|
|
.First()
|
|
|
|
|
.VictimFaction
|
|
|
|
|
;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override int CompareTo(LogEntry other) {
|
|
|
|
|
if (other.GetType() != typeof(FactionKillBonds)) {
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var b = other as FactionKillBonds;
|
|
|
|
|
if (b.VictimFaction == VictimFaction) {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override string ToString() {
|
2021-09-28 14:45:39 +02:00
|
|
|
|
return string.Format("Faction Kill Bonds: {0} against {1}",
|
|
|
|
|
Credits.FormatCredits(TotalSum),
|
|
|
|
|
VictimFaction);
|
2021-09-28 13:20:59 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|