2021-09-02 16:18:02 +02:00
|
|
|
|
namespace EDJournal {
|
|
|
|
|
public class CommitCrimeEntry : Entry {
|
2022-01-23 16:43:16 +01:00
|
|
|
|
public string CrimeType { get; set; }
|
|
|
|
|
public string Faction { get; set; }
|
|
|
|
|
public string Victim { get; set; }
|
2022-02-12 16:08:49 +01:00
|
|
|
|
public string VictimLocalised { get; set; }
|
2022-01-23 16:43:16 +01:00
|
|
|
|
public long Bounty { get; set; }
|
2022-01-23 16:46:21 +01:00
|
|
|
|
public long Fine { get; set; }
|
2021-09-02 16:18:02 +02:00
|
|
|
|
|
|
|
|
|
protected override void Initialise() {
|
2022-01-23 16:43:16 +01:00
|
|
|
|
CrimeType = JSON.Value<string>("CrimeType") ?? "assault";
|
|
|
|
|
Faction = JSON.Value<string>("Faction") ?? "";
|
|
|
|
|
Victim = JSON.Value<string>("Victim") ?? "";
|
2022-02-12 16:08:49 +01:00
|
|
|
|
VictimLocalised = JSON.Value<string>("Victim_Localised") ?? "";
|
2022-01-23 16:46:21 +01:00
|
|
|
|
Bounty = JSON.Value<long?>("Bounty") ?? 0;
|
|
|
|
|
Fine = JSON.Value<long?>("Fine") ?? 0;
|
2022-01-23 16:43:16 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool IsMurder {
|
|
|
|
|
get { return CrimeType?.CompareTo(CrimeTypes.Murder) == 0 || CrimeType?.CompareTo(CrimeTypes.OnFootMurder) == 0; }
|
2021-09-02 16:18:02 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|