Fix for view creators
This commit is contained in:
17
Plugin.cs
17
Plugin.cs
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user