two special warzone NPCs means high conflict zone
This commit is contained in:
parent
bb74d72b13
commit
65fec2cd1e
@ -17,7 +17,10 @@ internal class TransactionParserContext {
|
|||||||
|
|
||||||
public ulong? HighestCombatBond { get; set; }
|
public ulong? HighestCombatBond { get; set; }
|
||||||
|
|
||||||
public bool HaveSeenWarzoneNPC { get; set; } = false;
|
public bool HaveSeenCapShip { get; set; } = false;
|
||||||
|
public bool HaveSeenCaptain { get; set; } = false;
|
||||||
|
public bool HaveSeenSpecOps { get; set; } = false;
|
||||||
|
public bool HaveSeenCorrespondent { get; set; } = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// How many on foot kills were done.
|
/// How many on foot kills were done.
|
||||||
@ -75,10 +78,23 @@ internal class TransactionParserContext {
|
|||||||
} else if (ShipKills > 10) {
|
} else if (ShipKills > 10) {
|
||||||
grade = "Medium";
|
grade = "Medium";
|
||||||
}
|
}
|
||||||
if (HaveSeenWarzoneNPC && grade == "Low") {
|
|
||||||
// We have seen a warzone NPC so we know its at least medium
|
// Cap ship, means a high conflict zone
|
||||||
|
if (HaveSeenCapShip) {
|
||||||
|
grade = "High";
|
||||||
|
} else {
|
||||||
|
int warzoneNpcs = new List<bool>() { HaveSeenCaptain, HaveSeenCorrespondent, HaveSeenSpecOps }
|
||||||
|
.Where(x => x == true)
|
||||||
|
.Count()
|
||||||
|
;
|
||||||
|
|
||||||
|
if (warzoneNpcs >= 2 && grade != "High") {
|
||||||
|
// Only large combat zones have two NPCs
|
||||||
|
grade = "High";
|
||||||
|
} else if (warzoneNpcs >= 1 && grade == "Low") {
|
||||||
grade = "Medium";
|
grade = "Medium";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
cztype = "Ship";
|
cztype = "Ship";
|
||||||
} else {
|
} else {
|
||||||
transactions.AddIncomplete(new CombatZone(), "Failed to discern combat zone type");
|
transactions.AddIncomplete(new CombatZone(), "Failed to discern combat zone type");
|
||||||
@ -112,7 +128,10 @@ internal class TransactionParserContext {
|
|||||||
|
|
||||||
public void ResetCombatZone() {
|
public void ResetCombatZone() {
|
||||||
HighestCombatBond = null;
|
HighestCombatBond = null;
|
||||||
HaveSeenWarzoneNPC = false;
|
HaveSeenCapShip = false;
|
||||||
|
HaveSeenCaptain = false;
|
||||||
|
HaveSeenCorrespondent = false;
|
||||||
|
HaveSeenSpecOps = false;
|
||||||
LastRecordedAwardingFaction = null;
|
LastRecordedAwardingFaction = null;
|
||||||
OnFootKills = 0;
|
OnFootKills = 0;
|
||||||
ShipKills = 0;
|
ShipKills = 0;
|
||||||
@ -290,9 +309,19 @@ internal class ShipTargetedParser : TransactionParserPart {
|
|||||||
context.NPCFaction.TryAdd(entry.PilotNameLocalised, entry.Faction);
|
context.NPCFaction.TryAdd(entry.PilotNameLocalised, entry.Faction);
|
||||||
}
|
}
|
||||||
|
|
||||||
// We have seen a spec ops, so we know its medium or higher
|
// We have seen a captain?
|
||||||
if (NPCs.IsWarzoneNPC(entry.PilotName)) {
|
if (NPCs.IsWarzoneCaptain(entry.PilotName)) {
|
||||||
context.HaveSeenWarzoneNPC = true;
|
context.HaveSeenCaptain = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Spec ops?
|
||||||
|
if (NPCs.IsSpecOps(entry.PilotName)) {
|
||||||
|
context.HaveSeenSpecOps = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Correspondent?
|
||||||
|
if (NPCs.IsWarzoneCorrespondent(entry.PilotName)) {
|
||||||
|
context.HaveSeenCorrespondent = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user