Parsing fixes.
This commit is contained in:
@@ -287,7 +287,7 @@ namespace AssetStudio
|
||||
{
|
||||
public uint m_AvatarSize;
|
||||
public AvatarConstant m_Avatar;
|
||||
public KeyValuePair<uint, string>[] m_TOS;
|
||||
public Dictionary<uint, string> m_TOS;
|
||||
|
||||
public Avatar(ObjectReader reader) : base(reader)
|
||||
{
|
||||
@@ -295,10 +295,10 @@ namespace AssetStudio
|
||||
m_Avatar = new AvatarConstant(reader);
|
||||
|
||||
int numTOS = reader.ReadInt32();
|
||||
m_TOS = new KeyValuePair<uint, string>[numTOS];
|
||||
m_TOS = new Dictionary<uint, string>(numTOS);
|
||||
for (int i = 0; i < numTOS; i++)
|
||||
{
|
||||
m_TOS[i] = new KeyValuePair<uint, string>(reader.ReadUInt32(), reader.ReadAlignedString());
|
||||
m_TOS.Add(reader.ReadUInt32(), reader.ReadAlignedString());
|
||||
}
|
||||
|
||||
//HumanDescription m_HumanDescription 2019 and up
|
||||
@@ -306,7 +306,8 @@ namespace AssetStudio
|
||||
|
||||
public string FindBonePath(uint hash)
|
||||
{
|
||||
return m_TOS.FirstOrDefault(pair => pair.Key == hash).Value;
|
||||
m_TOS.TryGetValue(hash, out string path);
|
||||
return path;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user