Fix for view creators

This commit is contained in:
2026-04-07 00:18:59 -04:00
parent 85bdf31a4d
commit 685c5f48d6
2 changed files with 13 additions and 6 deletions

2
.gitignore vendored
View File

@@ -208,3 +208,5 @@ FakesAssemblies/
# JetBrains Rider
*.sln.iml
/AssemblyReferences/

View File

@@ -2,12 +2,12 @@
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using CsvHelper;
using Il2CppInterop.Runtime;
using Photon.Pun;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
namespace PhotonViewDumper;
@@ -41,16 +41,21 @@ public class Plugin : BasePlugin
{
try
{
var recNetId = view.Owner == null ? -1 : view.Owner.RecNetAccountId;
var creator = PhotonNetwork.PlayerList.FirstOrDefault(player => player.ActorNumber == view.CreatorActorNr);
if (creator == null)
{
Log.LogWarning($"Could not get creator for view ID {view.ViewID}");
continue;
}
CCEOLAOLEKJ recNetAccount = null;
PEGGCEDHBOF.DKNKKLPCGLM.TryGetValue(recNetId, out recNetAccount);
PEGGCEDHBOF.DKNKKLPCGLM.TryGetValue(creator.RecNetAccountId, out recNetAccount);
views.Add(new ViewElement
{
RecNetId = recNetId,
ActorId = view.Owner == null ? -1 : view.Owner.ActorNumber,
NickName = view.Owner == null ? "" : view.Owner.nickName,
RecNetId = creator.RecNetAccountId,
ActorId = creator.ActorNumber,
NickName = creator.nickName,
RecNetUserName = recNetAccount == null ? "" : recNetAccount.BIOGKFGIMDG.ToString(),
ViewId = view.ViewID,
PrefabName = view.name