I'm an idiot, they store encoded data for towers, we dont need a separate object unless we want to
This commit is contained in:
@@ -6,4 +6,28 @@ namespace TOOHUCardAPI.Data.Enums
|
||||
Team = 'D',
|
||||
All = 'T'
|
||||
}
|
||||
|
||||
public static class RankTypeExtensions
|
||||
{
|
||||
public static RankType ParseRankType(string rankType)
|
||||
{
|
||||
if (rankType == null || rankType.Length > 1)
|
||||
{
|
||||
return RankType.All;
|
||||
}
|
||||
|
||||
char identifier = rankType.ToCharArray()[0];
|
||||
if (identifier == (char) RankType.Single)
|
||||
{
|
||||
return RankType.Single;
|
||||
}
|
||||
|
||||
if (identifier == (char) RankType.Team)
|
||||
{
|
||||
return RankType.Team;
|
||||
}
|
||||
|
||||
return RankType.All;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user