edjournal/BountyEntry.cs

27 lines
767 B
C#
Raw Permalink Normal View History

2021-08-26 11:29:11 +02:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EDJournal {
/**
* This entry appears whenever a bounty is awarded.
*/
public class BountyEntry : Entry {
private string victimfaction = null;
private string target = null;
private int rewards = 0;
protected override void Initialise() {
rewards = JSON.Value<int?>("TotalReward") ?? 0;
victimfaction = JSON.Value<string>("VictimFaction") ?? "";
target = JSON.Value<string>("Target_Localised") ?? "";
}
public string VictimFaction => victimfaction;
public string Target => target;
public int Rewards => rewards;
}
}