public int GetFactionLanceDifficulty(string factionKey, LanceOverride lanceOverride) { foreach (KeyValuePair <string, List <ExtendedLance> > lanceSetPair in LanceSizes) { int lanceSize = int.Parse(lanceSetPair.Key); List <ExtendedLance> factions = lanceSetPair.Value; ExtendedLance lance = factions.FirstOrDefault(extendedLance => extendedLance.Faction == factionKey); if (lance != null) { return(lanceOverride.lanceDifficultyAdjustment + lance.DifficultyMod); } } return(lanceOverride.lanceDifficultyAdjustment); }
public int GetFactionLanceSize(string factionKey) { foreach (KeyValuePair <string, List <ExtendedLance> > lanceSetPair in LanceSizes) { int lanceSize = int.Parse(lanceSetPair.Key); List <ExtendedLance> factions = lanceSetPair.Value; ExtendedLance lance = factions.FirstOrDefault(extendedLance => extendedLance.Faction == factionKey); if (lance != null) { return(lanceSize); } } return(4); }