sort combat zones
This commit is contained in:
@@ -38,4 +38,23 @@ public class CombatZones {
|
||||
/// Very high difficulty, so far AX combat zone only
|
||||
/// </summary>
|
||||
public static readonly string DifficultyVeryHigh = "Very High";
|
||||
|
||||
/// <summary>
|
||||
/// Returns the given combat zone difficulty as an integer, so it can be sorted.
|
||||
/// 0 = lowest difficulty, 1 = medium and so forth.
|
||||
/// </summary>
|
||||
public static int? DifficultyRank(string difficulty) {
|
||||
Dictionary<string, int> ranks = new() {
|
||||
{ DifficultyLow, 0 },
|
||||
{ DifficultyMedium, 1 },
|
||||
{ DifficultyHigh, 2 },
|
||||
{ DifficultyVeryHigh, 3 }
|
||||
};
|
||||
|
||||
if (ranks.TryGetValue(difficulty, out int rank)) {
|
||||
return rank;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user