Added Unattainable rarity and fixed json null

This commit is contained in:
MaikyM 2019-12-12 08:47:08 -06:00
parent a145564524
commit ed1828f6d3
2 changed files with 4 additions and 4 deletions

View File

@ -92,9 +92,9 @@ namespace FModel.Methods.Assets.IconCreator
RarityCollectionIndexes rColor = RarityCollectionIndexes.Uncommon;
switch (rarityToken != null ? rarityToken.Value<string>() : string.Empty)
{
/*case "EFortRarity::Legendary": OLD IMPOSSIBLE (T9) but its EFortRarity doesn't exist anymore and T9 is now T7
case "EFortRarity::Unattainable": //OLD IMPOSSIBLE (T9) but its EFortRarity doesn't exist anymore and T9 is now T7
rColor = RarityCollectionIndexes.Impossible_T7;
break;*/
break;
case "EFortRarity::Transcendent":
rColor = RarityCollectionIndexes.Transcendent;
break;

View File

@ -487,14 +487,14 @@ namespace FModel.Methods.Utilities
if (json.StartsWith("[") && json.EndsWith("]"))
{
JArray AssetArray = JArray.FromObject(AssetData);
AssetMainToken = AssetArray[0];
AssetMainToken = AssetArray.Count() > 0 ? AssetArray[0] : null;
}
else if (json.StartsWith("{") && json.EndsWith("}"))
{
AssetMainToken = AssetData;
}
return AssetMainToken;
return !string.IsNullOrEmpty(AssetMainToken.ToString()) ? AssetMainToken : null;
}
public static T GetPropertyTag<T>(JArray properties, string name)