Fixed RenderSwitch, now the final phase will be displayed.

This commit is contained in:
MaikyM 2019-11-23 19:35:46 -06:00
parent c3ecfb4b39
commit 4a2fc6fc99
2 changed files with 2 additions and 3 deletions

View File

@ -2,7 +2,6 @@ using FModel.Methods.Utilities;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using PakReader;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
@ -27,7 +26,6 @@ namespace FModel.Methods.Assets.IconCreator.HeroID
string assetPath = AssetEntries.AssetEntriesDict.Where(x => x.Key.ToLowerInvariant().Contains("/" + heroGameplayDefinitionToken.Value<string>().ToLowerInvariant() + ".")).Select(d => d.Key).FirstOrDefault();
if (!string.IsNullOrEmpty(assetPath))
{
Console.WriteLine(assetPath);
string jsonData = AssetsUtility.GetAssetJsonDataByPath(assetPath, false, assetPath.Substring(0, assetPath.LastIndexOf(".")));
if (jsonData != null)
{

View File

@ -229,7 +229,8 @@ namespace FModel.Methods.Assets.IconCreator
JArray renderSwitchProperties = AssetMainToken["properties"].Value<JArray>();
if (renderSwitchProperties != null)
{
JArray textureParameterArray = AssetsUtility.GetPropertyTagText<JArray>(renderSwitchProperties, "TextureParameterValues", "data")[0]["struct_type"]["properties"].Value<JArray>();
JArray textureParameterArray = AssetsUtility.GetPropertyTagText<JArray>(renderSwitchProperties, "TextureParameterValues", "data");
textureParameterArray = textureParameterArray[textureParameterArray.Count() > 1 && !AssetsLoader.ExportType.Equals("AthenaItemWrapDefinition") ? 1 : 0]["struct_type"]["properties"].Value<JArray>();
if (textureParameterArray != null)
{
JToken parameterValueToken = AssetsUtility.GetPropertyTagOuterImport<JToken>(textureParameterArray, "ParameterValue");