Added new shellfinder ui
This commit is contained in:
@@ -68,7 +68,7 @@ public class BroadcastService : IHostedService, IMediatorSubscriber
|
||||
try
|
||||
{
|
||||
var cid = await _dalamudUtil.GetCIDAsync().ConfigureAwait(false);
|
||||
return cid.ToString().GetBlake3Hash();
|
||||
return cid.ToString().GetHash256();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -46,7 +46,7 @@ public sealed class XivDataAnalyzer
|
||||
if (handle->FileName.Length > 1024) continue;
|
||||
var skeletonName = handle->FileName.ToString();
|
||||
if (string.IsNullOrEmpty(skeletonName)) continue;
|
||||
outputIndices[skeletonName] = new();
|
||||
outputIndices[skeletonName] = [];
|
||||
for (ushort boneIdx = 0; boneIdx < curBones; boneIdx++)
|
||||
{
|
||||
var boneName = handle->HavokSkeleton->Bones[boneIdx].Name.String;
|
||||
@@ -70,7 +70,7 @@ public sealed class XivDataAnalyzer
|
||||
var cacheEntity = _fileCacheManager.GetFileCacheByHash(hash);
|
||||
if (cacheEntity == null) return null;
|
||||
|
||||
using BinaryReader reader = new BinaryReader(File.Open(cacheEntity.ResolvedFilepath, FileMode.Open, FileAccess.Read, FileShare.Read));
|
||||
using BinaryReader reader = new(File.Open(cacheEntity.ResolvedFilepath, FileMode.Open, FileAccess.Read, FileShare.Read));
|
||||
|
||||
// most of this shit is from vfxeditor, surely nothing will change in the pap format :copium:
|
||||
reader.ReadInt32(); // ignore
|
||||
@@ -177,17 +177,18 @@ public sealed class XivDataAnalyzer
|
||||
}
|
||||
|
||||
long tris = 0;
|
||||
for (int i = 0; i < file.LodCount; i++)
|
||||
foreach (var lod in file.Lods)
|
||||
{
|
||||
try
|
||||
{
|
||||
var meshIdx = file.Lods[i].MeshIndex;
|
||||
var meshCnt = file.Lods[i].MeshCount;
|
||||
var meshIdx = lod.MeshIndex;
|
||||
var meshCnt = lod.MeshCount;
|
||||
|
||||
tris = file.Meshes.Skip(meshIdx).Take(meshCnt).Sum(p => p.IndexCount) / 3;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogDebug(ex, "Could not load lod mesh {mesh} from path {path}", i, filePath);
|
||||
_logger.LogDebug(ex, "Could not load lod mesh {mesh} from path {path}", lod.MeshIndex, filePath);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user