diff --git a/Fika.Core/Coop/Airdrops/Utils/FikaItemFactoryUtil.cs b/Fika.Core/Coop/Airdrops/Utils/FikaItemFactoryUtil.cs index e6ab20cf..57be3577 100644 --- a/Fika.Core/Coop/Airdrops/Utils/FikaItemFactoryUtil.cs +++ b/Fika.Core/Coop/Airdrops/Utils/FikaItemFactoryUtil.cs @@ -31,7 +31,7 @@ public void BuildContainer(LootableContainer container, FikaAirdropConfigModel c if (itemFactory.ItemTemplates.TryGetValue(containerId, out ItemTemplate template)) { Item item = itemFactory.CreateItem(containerId, template._id, null); - item.Id = Singleton.Instance.MainPlayer.GClass2774_0.NextId; + item.Id = Singleton.Instance.MainPlayer.GClass2776_0.NextId; LootItem.CreateLootContainer(container, item, "CRATE", Singleton.Instance); } else diff --git a/Fika.Core/Coop/BotClasses/CoopBotHealthController.cs b/Fika.Core/Coop/BotClasses/CoopBotHealthController.cs index 029644b6..ae8d83d9 100644 --- a/Fika.Core/Coop/BotClasses/CoopBotHealthController.cs +++ b/Fika.Core/Coop/BotClasses/CoopBotHealthController.cs @@ -6,7 +6,7 @@ namespace Fika.Core.Coop.ClientClasses { - public sealed class CoopBotHealthController(Profile.GClass1766 healthInfo, Player player, InventoryControllerClass inventoryController, SkillManager skillManager, bool aiHealth) + public sealed class CoopBotHealthController(Profile.GClass1767 healthInfo, Player player, InventoryControllerClass inventoryController, SkillManager skillManager, bool aiHealth) : PlayerHealthController(healthInfo, player, inventoryController, skillManager, aiHealth) { private readonly CoopBot coopBot = (CoopBot)player; diff --git a/Fika.Core/Coop/BotClasses/CoopBotInventoryController.cs b/Fika.Core/Coop/BotClasses/CoopBotInventoryController.cs index 86e75b2c..79f22cf1 100644 --- a/Fika.Core/Coop/BotClasses/CoopBotInventoryController.cs +++ b/Fika.Core/Coop/BotClasses/CoopBotInventoryController.cs @@ -14,7 +14,7 @@ public class CoopBotInventoryController(Player player, Profile profile, bool exa { private readonly CoopBot CoopBot = (CoopBot)player; - public override void Execute(GClass2850 operation, [CanBeNull] Callback callback) + public override void Execute(GClass2853 operation, [CanBeNull] Callback callback) { base.Execute(operation, callback); @@ -25,7 +25,7 @@ public override void Execute(GClass2850 operation, [CanBeNull] Callback callback using MemoryStream memoryStream = new(); using BinaryWriter binaryWriter = new(memoryStream); - binaryWriter.WritePolymorph(GClass1642.FromInventoryOperation(operation, false)); + binaryWriter.WritePolymorph(GClass1643.FromInventoryOperation(operation, false)); byte[] opBytes = memoryStream.ToArray(); packet.ItemControllerExecutePacket = new() { diff --git a/Fika.Core/Coop/ClientClasses/CoopClientHealthController.cs b/Fika.Core/Coop/ClientClasses/CoopClientHealthController.cs index 9f1bed49..36116be9 100644 --- a/Fika.Core/Coop/ClientClasses/CoopClientHealthController.cs +++ b/Fika.Core/Coop/ClientClasses/CoopClientHealthController.cs @@ -6,7 +6,7 @@ namespace Fika.Core.Coop.ClientClasses { - public sealed class CoopClientHealthController(Profile.GClass1766 healthInfo, Player player, InventoryControllerClass inventoryController, SkillManager skillManager, bool aiHealth) + public sealed class CoopClientHealthController(Profile.GClass1767 healthInfo, Player player, InventoryControllerClass inventoryController, SkillManager skillManager, bool aiHealth) : PlayerHealthController(healthInfo, player, inventoryController, skillManager, aiHealth) { private readonly CoopPlayer coopPlayer = (CoopPlayer)player; diff --git a/Fika.Core/Coop/ClientClasses/CoopClientInventoryController.cs b/Fika.Core/Coop/ClientClasses/CoopClientInventoryController.cs index f2a536b1..482ab342 100644 --- a/Fika.Core/Coop/ClientClasses/CoopClientInventoryController.cs +++ b/Fika.Core/Coop/ClientClasses/CoopClientInventoryController.cs @@ -30,14 +30,14 @@ public override void CallMalfunctionRepaired(Weapon weapon) } } - public override void Execute(GClass2850 operation, [CanBeNull] Callback callback) + public override void Execute(GClass2853 operation, [CanBeNull] Callback callback) { #if DEBUG ConsoleScreen.Log("InvOperation: " + operation.GetType().Name); #endif // Do not replicate picking up quest items, throws an error on the other clients - if (operation is GClass2852 pickupOperation) + if (operation is GClass2855 pickupOperation) { if (pickupOperation.Item.Template.QuestItem) { @@ -67,7 +67,7 @@ public override void Execute(GClass2850 operation, [CanBeNull] Callback callback using MemoryStream memoryStream = new(); using BinaryWriter binaryWriter = new(memoryStream); - binaryWriter.WritePolymorph(GClass1642.FromInventoryOperation(operation, false)); + binaryWriter.WritePolymorph(GClass1643.FromInventoryOperation(operation, false)); byte[] opBytes = memoryStream.ToArray(); packet.ItemControllerExecutePacket = new() { @@ -103,12 +103,12 @@ public override void Execute(GClass2850 operation, [CanBeNull] Callback callback inventoryController = this }; - clientOperationManager.callback ??= new Callback(ClientPlayer.Control0.Class1422.class1422_0.method_0); + clientOperationManager.callback ??= new Callback(ClientPlayer.Control0.Class1426.class1426_0.method_0); uint operationNum = AddOperationCallback(operation, new Callback(clientOperationManager.HandleResult)); using MemoryStream memoryStream = new(); using BinaryWriter binaryWriter = new(memoryStream); - binaryWriter.WritePolymorph(GClass1642.FromInventoryOperation(operation, false)); + binaryWriter.WritePolymorph(GClass1643.FromInventoryOperation(operation, false)); byte[] opBytes = memoryStream.ToArray(); packet.ItemControllerExecutePacket = new() { @@ -120,17 +120,17 @@ public override void Execute(GClass2850 operation, [CanBeNull] Callback callback } } - private uint AddOperationCallback(GClass2850 operation, Callback callback) + private uint AddOperationCallback(GClass2853 operation, Callback callback) { ushort id = operation.Id; CoopPlayer.OperationCallbacks.Add(id, callback); return id; } - private class HostInventoryOperationManager(CoopClientInventoryController inventoryController, GClass2850 operation, Callback callback) + private class HostInventoryOperationManager(CoopClientInventoryController inventoryController, GClass2853 operation, Callback callback) { public readonly CoopClientInventoryController inventoryController = inventoryController; - public GClass2850 operation = operation; + public GClass2853 operation = operation; public readonly Callback callback = callback; public void HandleResult(IResult result) @@ -147,7 +147,7 @@ private class ClientInventoryOperationManager { public EOperationStatus? serverOperationStatus; public EOperationStatus? localOperationStatus; - public GClass2850 operation; + public GClass2853 operation; public Callback callback; public CoopClientInventoryController inventoryController; diff --git a/Fika.Core/Coop/ClientClasses/CoopClientStatisticsManager.cs b/Fika.Core/Coop/ClientClasses/CoopClientStatisticsManager.cs index 8e0d2b33..08c4adb7 100644 --- a/Fika.Core/Coop/ClientClasses/CoopClientStatisticsManager.cs +++ b/Fika.Core/Coop/ClientClasses/CoopClientStatisticsManager.cs @@ -3,7 +3,7 @@ namespace Fika.Core.Coop.ClientClasses { - public sealed class CoopClientStatisticsManager(Profile profile) : GClass1800() + public sealed class CoopClientStatisticsManager(Profile profile) : GClass1802() { public Profile Profile = profile; @@ -17,7 +17,7 @@ public override void ShowStatNotification(LocalizationKey localizationKey1, Loca { if (value > 0) { - NotificationManagerClass.DisplayNotification(new GClass2053(localizationKey1, localizationKey2, value)); + NotificationManagerClass.DisplayNotification(new GClass2055(localizationKey1, localizationKey2, value)); } } } diff --git a/Fika.Core/Coop/ClientClasses/HandsControllers/CoopClientFirearmController.cs b/Fika.Core/Coop/ClientClasses/HandsControllers/CoopClientFirearmController.cs index 1aa8982d..d9cb9160 100644 --- a/Fika.Core/Coop/ClientClasses/HandsControllers/CoopClientFirearmController.cs +++ b/Fika.Core/Coop/ClientClasses/HandsControllers/CoopClientFirearmController.cs @@ -47,7 +47,7 @@ public override Dictionary GetOperationFactoryDe return operationFactoryDelegates; } - public Player.GClass1593 Weapon1() + public Player.GClass1594 Weapon1() { if (Item.ReloadMode == Weapon.EReloadMode.InternalMagazine && Item.Chambers.Length == 0) { @@ -60,32 +60,32 @@ public Player.GClass1593 Weapon1() return new FirearmClass2(this); } - public Player.GClass1593 Weapon2() + public Player.GClass1594 Weapon2() { return new FirearmClass1(this); } - public Player.GClass1593 Weapon3() + public Player.GClass1594 Weapon3() { if (Item.IsFlareGun) { - return new GClass1615(this); + return new GClass1616(this); } if (Item.IsOneOff) { - return new GClass1617(this); + return new GClass1618(this); } if (Item.ReloadMode == Weapon.EReloadMode.OnlyBarrel) { - return new GClass1614(this); + return new GClass1615(this); } - if (Item is GClass2708) + if (Item is GClass2710) { - return new GClass1613(this); + return new GClass1614(this); } if (!Item.BoltAction) { - return new GClass1611(this); + return new GClass1612(this); } return new FirearmClass4(this); } @@ -197,7 +197,7 @@ public override bool ExamineWeapon() return flag; } - public override void InitiateShot(GInterface336 weapon, BulletClass ammo, Vector3 shotPosition, Vector3 shotDirection, Vector3 fireportPosition, int chamberIndex, float overheat) + public override void InitiateShot(GInterface337 weapon, BulletClass ammo, Vector3 shotPosition, Vector3 shotDirection, Vector3 fireportPosition, int chamberIndex, float overheat) { EShotType shotType = default; @@ -268,7 +268,7 @@ public override void QuickReloadMag(MagazineClass magazine, Callback callback) }); } - public override void ReloadBarrels(GClass2506 ammoPack, GClass2782 placeToPutContainedAmmoMagazine, Callback callback) + public override void ReloadBarrels(GClass2508 ammoPack, GClass2784 placeToPutContainedAmmoMagazine, Callback callback) { if (!CanStartReload() && ammoPack.AmmoCount < 1) { @@ -279,7 +279,7 @@ public override void ReloadBarrels(GClass2506 ammoPack, GClass2782 placeToPutCon CurrentOperation.ReloadBarrels(ammoPack, placeToPutContainedAmmoMagazine, callback, new Callback(handler.Process)); } - public override void ReloadCylinderMagazine(GClass2506 ammoPack, Callback callback, bool quickReload = false) + public override void ReloadCylinderMagazine(GClass2508 ammoPack, Callback callback, bool quickReload = false) { if (Blindfire) { @@ -299,7 +299,7 @@ public override void ReloadCylinderMagazine(GClass2506 ammoPack, Callback callba CurrentOperation.ReloadCylinderMagazine(ammoPack, callback, new Callback(handler.Process), handler.quickReload); } - public override void ReloadGrenadeLauncher(GClass2506 ammoPack, Callback callback) + public override void ReloadGrenadeLauncher(GClass2508 ammoPack, Callback callback) { if (!CanStartReload()) { @@ -320,7 +320,7 @@ public override void ReloadGrenadeLauncher(GClass2506 ammoPack, Callback callbac }); } - public override void ReloadMag(MagazineClass magazine, GClass2782 gridItemAddress, Callback callback) + public override void ReloadMag(MagazineClass magazine, GClass2784 gridItemAddress, Callback callback) { if (!CanStartReload() || Blindfire) { @@ -331,7 +331,7 @@ public override void ReloadMag(MagazineClass magazine, GClass2782 gridItemAddres CurrentOperation.ReloadMag(magazine, gridItemAddress, callback, new Callback(handler.Process)); } - public override void ReloadWithAmmo(GClass2506 ammoPack, Callback callback) + public override void ReloadWithAmmo(GClass2508 ammoPack, Callback callback) { if (Item.GetCurrentMagazine() == null) { @@ -550,7 +550,7 @@ private void SendBoltActionReloadPacket() }); } - private class FirearmClass1(Player.FirearmController controller) : GClass1599(controller) + private class FirearmClass1(Player.FirearmController controller) : GClass1600(controller) { public override void SetTriggerPressed(bool pressed) { @@ -634,7 +634,7 @@ public override void SetInventoryOpened(bool opened) SendBoltActionReloadPacket(true); } - public override void ReloadMag(MagazineClass magazine, GClass2782 gridItemAddress, Callback finishCallback, Callback startCallback) + public override void ReloadMag(MagazineClass magazine, GClass2784 gridItemAddress, Callback finishCallback, Callback startCallback) { base.ReloadMag(magazine, gridItemAddress, finishCallback, startCallback); SendBoltActionReloadPacket(true); @@ -646,7 +646,7 @@ public override void QuickReloadMag(MagazineClass magazine, Callback finishCallb SendBoltActionReloadPacket(true); } - public override void ReloadWithAmmo(GClass2506 ammoPack, Callback finishCallback, Callback startCallback) + public override void ReloadWithAmmo(GClass2508 ammoPack, Callback finishCallback, Callback startCallback) { base.ReloadWithAmmo(ammoPack, finishCallback, startCallback); SendBoltActionReloadPacket(true); @@ -671,15 +671,15 @@ public override void Reset() private bool hasSent; } - private class ReloadMagHandler(CoopPlayer coopPlayer, GClass2782 gridItemAddress, MagazineClass magazine) + private class ReloadMagHandler(CoopPlayer coopPlayer, GClass2784 gridItemAddress, MagazineClass magazine) { private readonly CoopPlayer coopPlayer = coopPlayer; - private readonly GClass2782 gridItemAddress = gridItemAddress; + private readonly GClass2784 gridItemAddress = gridItemAddress; private readonly MagazineClass magazine = magazine; public void Process(IResult error) { - GClass1538 gridItemAddressDescriptor = (gridItemAddress == null) ? null : GClass1642.FromGridItemAddress(gridItemAddress); + GClass1539 gridItemAddressDescriptor = (gridItemAddress == null) ? null : GClass1643.FromGridItemAddress(gridItemAddress); using MemoryStream memoryStream = new(); using BinaryWriter binaryWriter = new(memoryStream); @@ -741,15 +741,15 @@ public void Process(IResult error) } } - private class ReloadBarrelsHandler(CoopPlayer coopPlayer, GClass2782 placeToPutContainedAmmoMagazine, GClass2506 ammoPack) + private class ReloadBarrelsHandler(CoopPlayer coopPlayer, GClass2784 placeToPutContainedAmmoMagazine, GClass2508 ammoPack) { private readonly CoopPlayer coopPlayer = coopPlayer; - private readonly GClass2782 placeToPutContainedAmmoMagazine = placeToPutContainedAmmoMagazine; - private readonly GClass2506 ammoPack = ammoPack; + private readonly GClass2784 placeToPutContainedAmmoMagazine = placeToPutContainedAmmoMagazine; + private readonly GClass2508 ammoPack = ammoPack; public void Process(IResult error) { - GClass1538 gridItemAddressDescriptor = (placeToPutContainedAmmoMagazine == null) ? null : GClass1642.FromGridItemAddress(placeToPutContainedAmmoMagazine); + GClass1539 gridItemAddressDescriptor = (placeToPutContainedAmmoMagazine == null) ? null : GClass1643.FromGridItemAddress(placeToPutContainedAmmoMagazine); string[] ammoIds = ammoPack.GetReloadingAmmoIds(); diff --git a/Fika.Core/Coop/FreeCamera/FreeCameraController.cs b/Fika.Core/Coop/FreeCamera/FreeCameraController.cs index 9ac217b5..323ec8e9 100644 --- a/Fika.Core/Coop/FreeCamera/FreeCameraController.cs +++ b/Fika.Core/Coop/FreeCamera/FreeCameraController.cs @@ -233,10 +233,10 @@ private void ClearEffects() Destroy(bloodOnScreen); } - List effectsManagerList = effectsController.Field("list_0").GetValue>(); + List effectsManagerList = effectsController.Field("list_0").GetValue>(); if (effectsManagerList != null) { - foreach (EffectsController.Class572 effectsManager in effectsManagerList) + foreach (EffectsController.Class576 effectsManager in effectsManagerList) { while (effectsManager.ActiveEffects.Count > 0) { diff --git a/Fika.Core/Coop/GameMode/CoopGame.cs b/Fika.Core/Coop/GameMode/CoopGame.cs index a6733162..6e81cab7 100644 --- a/Fika.Core/Coop/GameMode/CoopGame.cs +++ b/Fika.Core/Coop/GameMode/CoopGame.cs @@ -67,7 +67,7 @@ internal sealed class CoopGame : BaseLocalGame, IBotGame, IF //private GameObject fikaStartButton; private readonly Dictionary botQueue = []; private Coroutine extractRoutine; - private GClass2945 spawnPoints = null; + private GClass2948 spawnPoints = null; private ISpawnPoint spawnPoint = null; private GClass579 GClass579; private WavesSpawnScenario wavesSpawnScenario_0; @@ -81,9 +81,6 @@ internal sealed class CoopGame : BaseLocalGame, IBotGame, IF public FikaDynamicAI DynamicAI { get; private set; } public RaidSettings RaidSettings { get; private set; } - //WildSpawnType for sptUsec and sptBear - const int sptUsecValue = 47; - const int sptBearValue = 48; public ISession BackEndSession { get => PatchConstants.BackEndSession; } BotsController IBotGame.BotsController { @@ -109,7 +106,7 @@ public IWeatherCurve WeatherCurve private static ManualLogSource Logger; - internal static CoopGame Create(GInterface170 inputTree, Profile profile, GameDateTime backendDateTime, + internal static CoopGame Create(GInterface171 inputTree, Profile profile, GameDateTime backendDateTime, InsuranceCompanyClass insurance, MenuUI menuUI, GameUI gameUI, LocationSettingsClass.Location location, TimeAndWeatherSettings timeAndWeather, WavesSettings wavesSettings, EDateTime dateTime, Callback callback, float fixedDeltaTime, EUpdateQueue updateQueue, @@ -191,7 +188,7 @@ private void SetupCustomWeather(TimeAndWeatherSettings timeAndWeather) public override void SetMatchmakerStatus(string status, float? progress = null) { - if (GClass3126.Instance.CurrentScreenController is MatchmakerTimeHasCome.GClass3182 gclass) + if (GClass3130.Instance.CurrentScreenController is MatchmakerTimeHasCome.GClass3186 gclass) { gclass.ChangeStatus(status, progress); } @@ -311,7 +308,7 @@ private bool IsInvalidBotForDespawning(KeyValuePair kvp) WildSpawnType role = kvp.Value.Profile.Info.Settings.Role; - if ((int)role != sptUsecValue && (int)role != sptBearValue && role != WildSpawnType.assault) + if (role is not WildSpawnType.pmcUSEC and not WildSpawnType.pmcBEAR and not WildSpawnType.assault) { // We skip all the bots that are not sptUsec, sptBear or assault. That means we never remove bosses, bossfollowers, and raiders return true; @@ -338,7 +335,7 @@ private async Task CreateBot(Profile profile, Vector3 position) WildSpawnType role = profile.Info.Settings.Role; bool isSpecial = false; - if ((int)role != sptUsecValue && (int)role != sptBearValue && role != WildSpawnType.assault) + if (role is not WildSpawnType.pmcUSEC and not WildSpawnType.pmcBEAR and not WildSpawnType.assault) { #if DEBUG Logger.LogWarning($"Bot {profile.Info.Settings.Role} is a special bot."); @@ -558,7 +555,7 @@ public override IEnumerator vmethod_1() int timeBeforeDeployLocal = Singleton.Instance.TimeBeforeDeployLocal; DateTime dateTime = GClass1304.Now.AddSeconds(timeBeforeDeployLocal); - new MatchmakerFinalCountdown.GClass3181(Profile_0, dateTime).ShowScreen(EScreenState.Root); + new MatchmakerFinalCountdown.GClass3185(Profile_0, dateTime).ShowScreen(EScreenState.Root); MonoBehaviourSingleton.Instance.FadeInVolumeBeforeRaid(timeBeforeDeployLocal); Singleton.Instance.StopMenuBackgroundMusicWithDelay(timeBeforeDeployLocal); GameUi.gameObject.SetActive(true); @@ -600,7 +597,7 @@ private IEnumerator WaitForOtherPlayers() NetDataWriter writer = new(); - MatchmakerAcceptPatches.GClass3182.ChangeStatus("Waiting for other players to finish loading..."); + MatchmakerAcceptPatches.GClass3186.ChangeStatus("Waiting for other players to finish loading..."); /*if (fikaStartButton != null) { @@ -636,7 +633,7 @@ private IEnumerator WaitForOtherPlayers() do { - MatchmakerAcceptPatches.GClass3182.ChangeStatus("Waiting for other players to finish loading...", server.ReadyClients / expectedPlayers); + MatchmakerAcceptPatches.GClass3186.ChangeStatus("Waiting for other players to finish loading...", server.ReadyClients / expectedPlayers); yield return new WaitForEndOfFrame(); } while (server.ReadyClients < expectedPlayers); @@ -670,7 +667,7 @@ private IEnumerator WaitForOtherPlayers() do { - MatchmakerAcceptPatches.GClass3182.ChangeStatus("Waiting for other players to finish loading...", client.ReadyClients / expectedPlayers); + MatchmakerAcceptPatches.GClass3186.ChangeStatus("Waiting for other players to finish loading...", client.ReadyClients / expectedPlayers); yield return new WaitForEndOfFrame(); } while (client.ReadyClients < expectedPlayers); } @@ -762,7 +759,7 @@ public override async Task vmethod_2(int playerId, Vector3 position LocalPlayer myPlayer = await CoopPlayer.Create(playerId, spawnPoint.Position, spawnPoint.Rotation, "Player", "Main_", EPointOfView.FirstPerson, profile, false, UpdateQueue, armsUpdateMode, bodyUpdateMode, GClass548.Config.CharacterController.ClientPlayerMode, getSensitivity, - getAimingSensitivity, new GClass1455(), isServer ? 0 : 1000, statisticsManager); + getAimingSensitivity, new GClass1456(), isServer ? 0 : 1000, statisticsManager); await NetManagerUtils.InitNetManager(isServer); @@ -971,10 +968,10 @@ private async Task CreateLocalPlayer() eupdateMode = Player.EUpdateMode.Manual; } - spawnPoints = GClass2945.CreateFromScene(new DateTime?(GClass1304.LocalDateTimeFromUnixTime(Location_0.UnixDateTime)), Location_0.SpawnPointParams); + spawnPoints = GClass2948.CreateFromScene(new DateTime?(GClass1304.LocalDateTimeFromUnixTime(Location_0.UnixDateTime)), Location_0.SpawnPointParams); int spawnSafeDistance = (Location_0.SpawnSafeDistanceMeters > 0) ? Location_0.SpawnSafeDistanceMeters : 100; GStruct380 settings = new(Location_0.MinDistToFreePoint, Location_0.MaxDistToFreePoint, Location_0.MaxBotPerZone, spawnSafeDistance); - SpawnSystem = GClass2946.CreateSpawnSystem(settings, () => Time.time, Singleton.Instance, zones: botsController_0, spawnPoints); + SpawnSystem = GClass2949.CreateSpawnSystem(settings, () => Time.time, Singleton.Instance, zones: botsController_0, spawnPoints); if (isServer) { @@ -996,7 +993,7 @@ private async Task CreateLocalPlayer() LocalPlayer myPlayer = await vmethod_2(num, spawnPoint.Position, spawnPoint.Rotation, "Player", "Main_", EPointOfView.FirstPerson, Profile_0, false, UpdateQueue, eupdateMode, Player.EUpdateMode.Auto, GClass548.Config.CharacterController.ClientPlayerMode, - new Func(Class1380.class1380_0.method_3), new Func(Class1380.class1380_0.method_4), + new Func(Class1384.class1384_0.method_3), new Func(Class1384.class1384_0.method_4), statisticsManager, null, null); myPlayer.Location = Location_0.Id; @@ -1009,9 +1006,9 @@ private async Task WaitForPlayers() { Logger.LogInfo("Starting task to wait for other players."); - if (MatchmakerAcceptPatches.GClass3182 != null) + if (MatchmakerAcceptPatches.GClass3186 != null) { - MatchmakerAcceptPatches.GClass3182.ChangeStatus($"Initializing Coop Game..."); + MatchmakerAcceptPatches.GClass3186.ChangeStatus($"Initializing Coop Game..."); } int numbersOfPlayersToWaitFor = 0; @@ -1022,15 +1019,15 @@ private async Task WaitForPlayers() do { numbersOfPlayersToWaitFor = MatchmakerAcceptPatches.HostExpectedNumberOfPlayers - (server.NetServer.ConnectedPeersCount + 1); - if (MatchmakerAcceptPatches.GClass3182 != null) + if (MatchmakerAcceptPatches.GClass3186 != null) { if (numbersOfPlayersToWaitFor > 0) { - MatchmakerAcceptPatches.GClass3182.ChangeStatus($"Waiting for {numbersOfPlayersToWaitFor} {(numbersOfPlayersToWaitFor > 1 ? "players" : "player")}"); + MatchmakerAcceptPatches.GClass3186.ChangeStatus($"Waiting for {numbersOfPlayersToWaitFor} {(numbersOfPlayersToWaitFor > 1 ? "players" : "player")}"); } else { - MatchmakerAcceptPatches.GClass3182.ChangeStatus($"All players joined, starting game..."); + MatchmakerAcceptPatches.GClass3186.ChangeStatus($"All players joined, starting game..."); } } else @@ -1054,7 +1051,7 @@ private async Task WaitForPlayers() while (client.ServerConnection == null && connectionAttempts < 5) { // Server retries 10 times with a 500ms interval, we give it 5 seconds to try - MatchmakerAcceptPatches.GClass3182.ChangeStatus("Waiting for client to connect to server... If there is no notification it failed."); + MatchmakerAcceptPatches.GClass3186.ChangeStatus("Waiting for client to connect to server... If there is no notification it failed."); connectionAttempts++; await Task.Delay(1000); @@ -1076,15 +1073,15 @@ private async Task WaitForPlayers() do { numbersOfPlayersToWaitFor = MatchmakerAcceptPatches.HostExpectedNumberOfPlayers - (client.ConnectedClients + 1); - if (MatchmakerAcceptPatches.GClass3182 != null) + if (MatchmakerAcceptPatches.GClass3186 != null) { if (numbersOfPlayersToWaitFor > 0) { - MatchmakerAcceptPatches.GClass3182.ChangeStatus($"Waiting for {numbersOfPlayersToWaitFor} {(numbersOfPlayersToWaitFor > 1 ? "players" : "player")}"); + MatchmakerAcceptPatches.GClass3186.ChangeStatus($"Waiting for {numbersOfPlayersToWaitFor} {(numbersOfPlayersToWaitFor > 1 ? "players" : "player")}"); } else { - MatchmakerAcceptPatches.GClass3182.ChangeStatus($"All players joined, starting game..."); + MatchmakerAcceptPatches.GClass3186.ChangeStatus($"All players joined, starting game..."); } } else @@ -1127,7 +1124,8 @@ public override IEnumerator vmethod_4(BotControllerSettings controllerSettings, if (isServer) { - BotsPresets profileCreator = new(BackEndSession, wavesSpawnScenario_0.SpawnWaves, GClass579.BossSpawnWaves, nonWavesSpawnScenario_0.GClass1477_0, false); + BotsPresets profileCreator = new(BackEndSession, wavesSpawnScenario_0.SpawnWaves, + GClass579.BossSpawnWaves, nonWavesSpawnScenario_0.GClass1478_0, false); GClass814 botCreator = new(this, profileCreator, CreateBot); BotZone[] botZones = LocationScene.GetAllObjects(false).ToArray(); @@ -1205,9 +1203,9 @@ public override IEnumerator vmethod_4(BotControllerSettings controllerSettings, BackendConfigSettingsClass instance = Singleton.Instance; - LocalGame.Class1387 seasonTaskHandler = new(); + LocalGame.Class1391 seasonTaskHandler = new(); ESeason season = ginterface158_0.Season; - Class393 seasonHandler = new(); + Class394 seasonHandler = new(); Singleton.Instance.GInterface26_0 = seasonHandler; seasonTaskHandler.task = seasonHandler.Run(season); yield return new WaitUntil(new Func(seasonTaskHandler.method_0)); @@ -1536,7 +1534,7 @@ public void Extract(CoopPlayer player, ExfiltrationPoint point) extractRoutine = StartCoroutine(ExtractRoutine(player)); // Prevents players from looting after extracting - GClass3126.Instance.CloseAllScreensForced(); + GClass3130.Instance.CloseAllScreensForced(); // Detroys session timer if (timeManager != null) @@ -1639,7 +1637,8 @@ public override void Stop(string profileId, ExitStatus exitStatus, string exitNa { if (myPlayer.Equipment.GetSlot(EquipmentSlot.Dogtag).ContainedItem != null) { - GStruct415 result = InteractionsHandlerClass.Remove(myPlayer.Equipment.GetSlot(EquipmentSlot.Dogtag).ContainedItem, myPlayer.GClass2774_0, false, true); + GStruct415 result = InteractionsHandlerClass.Remove(myPlayer.Equipment.GetSlot(EquipmentSlot.Dogtag).ContainedItem, + myPlayer.GClass2776_0, false, true); if (result.Error != null) { FikaPlugin.Instance.FikaLogger.LogWarning("CoopGame::Stop: Error removing dog tag!"); @@ -1787,7 +1786,8 @@ private void StopFromError(string profileId, ExitStatus exitStatus) { if (myPlayer.Equipment.GetSlot(EquipmentSlot.Dogtag).ContainedItem != null) { - GStruct415 result = InteractionsHandlerClass.Remove(myPlayer.Equipment.GetSlot(EquipmentSlot.Dogtag).ContainedItem, myPlayer.GClass2774_0, false, true); + GStruct415 result = InteractionsHandlerClass.Remove(myPlayer.Equipment.GetSlot(EquipmentSlot.Dogtag).ContainedItem, + myPlayer.GClass2776_0, false, true); if (result.Error != null) { FikaPlugin.Instance.FikaLogger.LogWarning("CoopGame::StopFromError: Error removing dog tag!"); @@ -1973,7 +1973,7 @@ private class ExitManager(CoopGame localGame, ExitStatus exitStatus, string exit public void HandleExit() { - GClass3126 screenManager = GClass3126.Instance; + GClass3130 screenManager = GClass3130.Instance; if (screenManager.CheckCurrentScreen(EEftScreenType.Reconnect)) { screenManager.CloseAllScreensForced(); @@ -2005,11 +2005,11 @@ private void FireCallback() } } - private class ErrorExitManager : Class1382 + private class ErrorExitManager : Class1386 { public void ExitOverride() { - GClass3126 instance = GClass3126.Instance; + GClass3130 instance = GClass3130.Instance; if (instance != null && instance.CheckCurrentScreen(EEftScreenType.Reconnect)) { instance.CloseAllScreensForced(); diff --git a/Fika.Core/Coop/Matchmaker/MatchmakerAccept/MatchmakerAcceptPatches.cs b/Fika.Core/Coop/Matchmaker/MatchmakerAccept/MatchmakerAcceptPatches.cs index bae39e6a..bdd6c52c 100644 --- a/Fika.Core/Coop/Matchmaker/MatchmakerAccept/MatchmakerAcceptPatches.cs +++ b/Fika.Core/Coop/Matchmaker/MatchmakerAccept/MatchmakerAcceptPatches.cs @@ -53,7 +53,7 @@ public static object MatchmakerScreenController } public static GameObject EnvironmentUIRoot { get; internal set; } - public static MatchmakerTimeHasCome.GClass3182 GClass3182 { get; internal set; } + public static MatchmakerTimeHasCome.GClass3186 GClass3186 { get; internal set; } #endregion public static string GetGroupId() diff --git a/Fika.Core/Coop/ObservedClasses/CoopObservedStatisticsManager.cs b/Fika.Core/Coop/ObservedClasses/CoopObservedStatisticsManager.cs index 68d6dc5e..635b9b38 100644 --- a/Fika.Core/Coop/ObservedClasses/CoopObservedStatisticsManager.cs +++ b/Fika.Core/Coop/ObservedClasses/CoopObservedStatisticsManager.cs @@ -46,7 +46,7 @@ public void Init(Player player) Player = player; } - public void OnEnemyDamage(DamageInfo damage, EBodyPart bodyPart, EPlayerSide playerSide, WildSpawnType role, string groupId, float fullHealth, bool isHeavyDamage, float distance, int hour, List targetEquipment, HealthEffects enemyEffects, List zoneIds) + public void OnEnemyDamage(DamageInfo damage, EBodyPart bodyPart, string playerProfileId, EPlayerSide playerSide, WildSpawnType role, string groupId, float fullHealth, bool isHeavyDamage, float distance, int hour, List targetEquipment, HealthEffects enemyEffects, List zoneIds) { // Do nothing } diff --git a/Fika.Core/Coop/ObservedClasses/HandsControllers/CoopObservedFirearmController.cs b/Fika.Core/Coop/ObservedClasses/HandsControllers/CoopObservedFirearmController.cs index 210dd508..daae1b1e 100644 --- a/Fika.Core/Coop/ObservedClasses/HandsControllers/CoopObservedFirearmController.cs +++ b/Fika.Core/Coop/ObservedClasses/HandsControllers/CoopObservedFirearmController.cs @@ -26,7 +26,7 @@ public class CoopObservedFirearmController : FirearmController private float aimMovementSpeed = 1f; private bool hasFired = false; private WeaponPrefab weaponPrefab; - private GClass1592 underBarrelManager; + private GClass1593 underBarrelManager; public override bool IsAiming { get => base.IsAiming; @@ -63,7 +63,7 @@ protected void Start() weaponPrefab = ControllerGameObject.GetComponent(); if (UnderbarrelWeapon != null) { - underBarrelManager = Traverse.Create(this).Field("gclass1592_0").GetValue(); + underBarrelManager = Traverse.Create(this).Field("gclass1593_0").GetValue(); } } @@ -297,7 +297,7 @@ public void HandleFirearmPacket(in WeaponPacket packet, InventoryControllerClass if (Weapon.Chambers[i].ContainedItem is BulletClass bClass && !bClass.IsUsed) { bClass.IsUsed = true; - if (weaponPrefab != null && weaponPrefab.ObjectInHands is GClass1678 weaponEffectsManager) + if (weaponPrefab != null && weaponPrefab.ObjectInHands is GClass1679 weaponEffectsManager) { if (!bClass.AmmoTemplate.RemoveShellAfterFire) { @@ -319,7 +319,7 @@ public void HandleFirearmPacket(in WeaponPacket packet, InventoryControllerClass else { Weapon.Chambers[0].RemoveItem(false); - if (weaponPrefab != null && weaponPrefab.ObjectInHands is GClass1678 weaponEffectsManager) + if (weaponPrefab != null && weaponPrefab.ObjectInHands is GClass1679 weaponEffectsManager) { HandleShellEvent(weaponEffectsManager, packet, ammo, magazine); } @@ -327,7 +327,7 @@ public void HandleFirearmPacket(in WeaponPacket packet, InventoryControllerClass } // Remember to check if classes increment - if (Weapon is GClass2708) + if (Weapon is GClass2710) { Weapon.CylinderHammerClosed = Weapon.FireMode.FireMode == Weapon.EFireMode.doubleaction; @@ -360,7 +360,7 @@ public void HandleFirearmPacket(in WeaponPacket packet, InventoryControllerClass { if (Item.HasChambers) { - magazine.Cartridges.PopTo(inventoryController, new GClass2780(Item.Chambers[0])); + magazine.Cartridges.PopTo(inventoryController, new GClass2782(Item.Chambers[0])); } else { @@ -454,7 +454,7 @@ public void HandleFirearmPacket(in WeaponPacket packet, InventoryControllerClass FikaPlugin.Instance.FikaLogger.LogError($"CoopObservedFirearmController::HandleFirearmPacket: There is no item {packet.ReloadMagPacket.MagId} in profile {coopPlayer.ProfileId}"); throw; } - GClass2782 gridItemAddress = null; + GClass2784 gridItemAddress = null; if (packet.ReloadMagPacket.LocationDescription != null) { using MemoryStream memoryStream = new(packet.ReloadMagPacket.LocationDescription); @@ -463,7 +463,7 @@ public void HandleFirearmPacket(in WeaponPacket packet, InventoryControllerClass { if (packet.ReloadMagPacket.LocationDescription.Length != 0) { - GClass1538 descriptor = binaryReader.ReadEFTGridItemAddressDescriptor(); + GClass1539 descriptor = binaryReader.ReadEFTGridItemAddressDescriptor(); gridItemAddress = inventoryController.ToGridItemAddress(descriptor); } } @@ -520,7 +520,7 @@ public void HandleFirearmPacket(in WeaponPacket packet, InventoryControllerClass if (packet.ReloadWithAmmo.Status == FikaSerialization.ReloadWithAmmoPacket.EReloadWithAmmoStatus.StartReload) { List bullets = FindAmmoByIds(packet.ReloadWithAmmo.AmmoIds); - GClass2506 ammoPack = new(bullets); + GClass2508 ammoPack = new(bullets); if (!packet.HasCylinderMagPacket) { CurrentOperation.ReloadWithAmmo(ammoPack, null, null); @@ -546,7 +546,7 @@ public void HandleFirearmPacket(in WeaponPacket packet, InventoryControllerClass if (packet.ReloadWithAmmo.Status == FikaSerialization.ReloadWithAmmoPacket.EReloadWithAmmoStatus.StartReload) { List bullets = FindAmmoByIds(packet.ReloadWithAmmo.AmmoIds); - GClass2506 ammoPack = new(bullets); + GClass2508 ammoPack = new(bullets); ReloadCylinderMagazine(ammoPack, null); } } @@ -559,7 +559,7 @@ public void HandleFirearmPacket(in WeaponPacket packet, InventoryControllerClass }*/ - if (packet.HasRollCylinder && Weapon is GClass2708 rollWeapon) + if (packet.HasRollCylinder && Weapon is GClass2710 rollWeapon) { RollCylinder(packet.RollToZeroCamora); } @@ -569,7 +569,7 @@ public void HandleFirearmPacket(in WeaponPacket packet, InventoryControllerClass if (packet.ReloadLauncher.Reload) { List ammo = FindAmmoByIds(packet.ReloadLauncher.AmmoIds); - GClass2506 ammoPack = new(ammo); + GClass2508 ammoPack = new(ammo); ReloadGrenadeLauncher(ammoPack, null); } } @@ -580,9 +580,9 @@ public void HandleFirearmPacket(in WeaponPacket packet, InventoryControllerClass { List ammo = FindAmmoByIds(packet.ReloadBarrels.AmmoIds); - GClass2506 ammoPack = new(ammo); + GClass2508 ammoPack = new(ammo); - GClass2782 gridItemAddress = null; + GClass2784 gridItemAddress = null; using MemoryStream memoryStream = new(packet.ReloadBarrels.LocationDescription); using BinaryReader binaryReader = new(memoryStream); @@ -590,7 +590,7 @@ public void HandleFirearmPacket(in WeaponPacket packet, InventoryControllerClass { if (packet.ReloadBarrels.LocationDescription.Length > 0) { - GClass1538 descriptor = binaryReader.ReadEFTGridItemAddressDescriptor(); + GClass1539 descriptor = binaryReader.ReadEFTGridItemAddressDescriptor(); gridItemAddress = inventoryController.ToGridItemAddress(descriptor); } } @@ -647,7 +647,7 @@ private IEnumerator ObservedBoltAction(FirearmsAnimator animator, FirearmControl yield return new WaitForSeconds(0.75f); - if (weaponPrefab != null && weaponPrefab.ObjectInHands is GClass1678 weaponEffectsManager) + if (weaponPrefab != null && weaponPrefab.ObjectInHands is GClass1679 weaponEffectsManager) { weaponEffectsManager.StartSpawnShell(coopPlayer.Velocity * 0.33f, 0); } @@ -656,14 +656,14 @@ private IEnumerator ObservedBoltAction(FirearmsAnimator animator, FirearmControl if (controller.Item.GetCurrentMagazine() != null && magazine is not CylinderMagazineClass) { - magazine.Cartridges.PopTo(inventoryController, new GClass2780(controller.Item.Chambers[0])); + magazine.Cartridges.PopTo(inventoryController, new GClass2782(controller.Item.Chambers[0])); } animator.SetBoltActionReload(false); animator.SetFire(false); } - private void HandleShellEvent(GClass1678 weaponEffectsManager, WeaponPacket packet, BulletClass ammo, MagazineClass magazine) + private void HandleShellEvent(GClass1679 weaponEffectsManager, WeaponPacket packet, BulletClass ammo, MagazineClass magazine) { weaponEffectsManager.DestroyPatronInWeapon(packet.ShotInfoPacket.ChamberIndex); if (!ammo.AmmoTemplate.RemoveShellAfterFire) @@ -681,7 +681,7 @@ private void HandleShellEvent(GClass1678 weaponEffectsManager, WeaponPacket pack weaponEffectsManager.SetRoundIntoWeapon(ammo, 0); } - if (Weapon is GClass2708 || Weapon.ReloadMode == Weapon.EReloadMode.OnlyBarrel || Weapon.BoltAction) + if (Weapon is GClass2710 || Weapon.ReloadMode == Weapon.EReloadMode.OnlyBarrel || Weapon.BoltAction) { return; } diff --git a/Fika.Core/Coop/ObservedClasses/MovementStates/ObservedRunState.cs b/Fika.Core/Coop/ObservedClasses/MovementStates/ObservedRunState.cs index a0e31940..9ca56c91 100644 --- a/Fika.Core/Coop/ObservedClasses/MovementStates/ObservedRunState.cs +++ b/Fika.Core/Coop/ObservedClasses/MovementStates/ObservedRunState.cs @@ -4,7 +4,7 @@ namespace Fika.Core.Coop.ObservedClasses.MovementStates { - internal class ObservedRunState : GClass1715 + internal class ObservedRunState : GClass1716 { public ObservedRunState(MovementContext movementContext) : base(movementContext) { diff --git a/Fika.Core/Coop/ObservedClasses/MovementStates/ObservedSprintState.cs b/Fika.Core/Coop/ObservedClasses/MovementStates/ObservedSprintState.cs index 6786566a..0c215e60 100644 --- a/Fika.Core/Coop/ObservedClasses/MovementStates/ObservedSprintState.cs +++ b/Fika.Core/Coop/ObservedClasses/MovementStates/ObservedSprintState.cs @@ -5,7 +5,7 @@ namespace Fika.Core.Coop.ObservedClasses.MovementStates { - internal class ObservedSprintState : GClass1715 + internal class ObservedSprintState : GClass1719 { public ObservedSprintState(MovementContext movementContext) : base(movementContext) { @@ -37,7 +37,7 @@ public override void ManualAnimatorMoveUpdate(float deltaTime) /*MovementContext.ProcessSpeedLimits(deltaTime);*/ MovementContext.MovementDirection = Vector2.Lerp(MovementContext.MovementDirection, Direction, deltaTime * EFTHardSettings.Instance.DIRECTION_LERP_SPEED); //MovementContext.ApplyRotation(Quaternion.AngleAxis(MovementContext.Yaw, Vector3.up)); - MovementContext.SetUpDiscreteDirection(GClass1667.ConvertToMovementDirection(Direction)); + MovementContext.SetUpDiscreteDirection(GClass1668.ConvertToMovementDirection(Direction)); Direction = Vector2.zero; MovementContext.SprintAcceleration(deltaTime); UpdateRotationAndPosition(deltaTime); diff --git a/Fika.Core/Coop/ObservedClasses/ObservedHealthController.cs b/Fika.Core/Coop/ObservedClasses/ObservedHealthController.cs index 4e4c1821..7cc59dc7 100644 --- a/Fika.Core/Coop/ObservedClasses/ObservedHealthController.cs +++ b/Fika.Core/Coop/ObservedClasses/ObservedHealthController.cs @@ -5,7 +5,7 @@ namespace Fika.Core.Coop.ObservedClasses { - public sealed class ObservedHealthController(byte[] serializedState, InventoryControllerClass inventory, SkillManager skills) : GClass2428(serializedState, inventory, skills) + public sealed class ObservedHealthController(byte[] serializedState, InventoryControllerClass inventory, SkillManager skills) : GClass2430(serializedState, inventory, skills) { public override bool ApplyItem(Item item, EBodyPart bodyPart, float? amount = null) { diff --git a/Fika.Core/Coop/Patches/LocalGame/TarkovApplication_LocalGameCreator_Patch.cs b/Fika.Core/Coop/Patches/LocalGame/TarkovApplication_LocalGameCreator_Patch.cs index 5e513307..a8eeffd8 100644 --- a/Fika.Core/Coop/Patches/LocalGame/TarkovApplication_LocalGameCreator_Patch.cs +++ b/Fika.Core/Coop/Patches/LocalGame/TarkovApplication_LocalGameCreator_Patch.cs @@ -51,7 +51,7 @@ public static bool Prefix(TarkovApplication __instance) } [PatchPostfix] - public static async Task Postfix(Task __result, TarkovApplication __instance, TimeAndWeatherSettings timeAndWeather, MatchmakerTimeHasCome.GClass3182 timeHasComeScreenController, + public static async Task Postfix(Task __result, TarkovApplication __instance, TimeAndWeatherSettings timeAndWeather, MatchmakerTimeHasCome.GClass3186 timeHasComeScreenController, RaidSettings ____raidSettings, InputTree ____inputTree, GameDateTime ____localGameDateTime, float ____fixedDeltaTime, string ____backendUrl) { if (MatchmakerAcceptPatches.IsSinglePlayer) @@ -80,7 +80,7 @@ public static async Task Postfix(Task __result, TarkovApplication __instance, Ti LocationSettingsClass.Location location = ____raidSettings.SelectedLocation; - MatchmakerAcceptPatches.GClass3182 = timeHasComeScreenController; + MatchmakerAcceptPatches.GClass3186 = timeHasComeScreenController; if (Singleton.Instantiated) { @@ -144,13 +144,13 @@ public static async Task Postfix(Task __result, TarkovApplication __instance, Ti __result = Task.WhenAll(finishTask); } - private class StartHandler(TarkovApplication tarkovApplication, Profile pmcProfile, Profile scavProfile, LocationSettingsClass.Location location, MatchmakerTimeHasCome.GClass3182 timeHasComeScreenController) + private class StartHandler(TarkovApplication tarkovApplication, Profile pmcProfile, Profile scavProfile, LocationSettingsClass.Location location, MatchmakerTimeHasCome.GClass3186 timeHasComeScreenController) { private readonly TarkovApplication tarkovApplication = tarkovApplication; private readonly Profile pmcProfile = pmcProfile; private readonly Profile scavProfile = scavProfile; private readonly LocationSettingsClass.Location location = location; - private readonly MatchmakerTimeHasCome.GClass3182 timeHasComeScreenController = timeHasComeScreenController; + private readonly MatchmakerTimeHasCome.GClass3186 timeHasComeScreenController = timeHasComeScreenController; public void HandleStop(Result result) { diff --git a/Fika.Core/Coop/Patches/Minefield/Minefield_method_2_Patch.cs b/Fika.Core/Coop/Patches/Minefield/Minefield_method_2_Patch.cs index d4f6ccc3..cc2097a1 100644 --- a/Fika.Core/Coop/Patches/Minefield/Minefield_method_2_Patch.cs +++ b/Fika.Core/Coop/Patches/Minefield/Minefield_method_2_Patch.cs @@ -65,7 +65,7 @@ private static void DoReplicatedMineDamage(IPlayer player, float distance, bool IEnumerable enumerable = isCollateral ? player.PlayerBones.BodyPartColliders.Where(new Func(minefield.method_4)) : player.PlayerBones.BodyPartColliders.Where(new Func(minefield.method_5)); - enumerable = enumerable.DistinctBy(new Func(Minefield.Class2312.class2312_0.method_0)).ToArray(); + enumerable = enumerable.DistinctBy(new Func(Minefield.Class2316.class2316_0.method_0)).ToArray(); enumerable = enumerable.Randomize(); int num3 = ((isCollateral || first) ? UnityEngine.Random.Range(2, enumerable.Count()) : int.MaxValue); diff --git a/Fika.Core/Coop/Patches/Overrides/OfflineRaidSettingsMenuPatch_Override.cs b/Fika.Core/Coop/Patches/Overrides/OfflineRaidSettingsMenuPatch_Override.cs index 865750a8..f2bba600 100644 --- a/Fika.Core/Coop/Patches/Overrides/OfflineRaidSettingsMenuPatch_Override.cs +++ b/Fika.Core/Coop/Patches/Overrides/OfflineRaidSettingsMenuPatch_Override.cs @@ -42,7 +42,7 @@ private static void PatchPostfix(RaidSettingsWindow __instance, UiElementBlocker } // Remove redundant settings and add our own "Random" to make the setting clear, while also renaming index 0 to "Together" - List labelList = Traverse.Create(____playersSpawnPlaceDropdown).Field("list_0").GetValue>(); + List labelList = Traverse.Create(____playersSpawnPlaceDropdown).Field("list_0").GetValue>(); labelList.Clear(); labelList.Add(new() { diff --git a/Fika.Core/Coop/Players/CoopBot.cs b/Fika.Core/Coop/Players/CoopBot.cs index 449d341d..6d94594a 100644 --- a/Fika.Core/Coop/Players/CoopBot.cs +++ b/Fika.Core/Coop/Players/CoopBot.cs @@ -42,7 +42,7 @@ public static async Task CreateBot(int playerId, Vector3 position, CharacterControllerSpawner.Mode characterControllerMode, Func getSensitivity, Func getAimingSensitivity, GInterface111 filter) { - CoopBot player = Create(GClass1398.PLAYER_BUNDLE_NAME, playerId, position, updateQueue, armsUpdateMode, + CoopBot player = Create(GClass1399.PLAYER_BUNDLE_NAME, playerId, position, updateQueue, armsUpdateMode, bodyUpdateMode, characterControllerMode, getSensitivity, getAimingSensitivity, prefix, aiControl); player.IsYourPlayer = false; @@ -78,7 +78,7 @@ public override void OnVaulting() // Do nothing } - public override void OnSkillLevelChanged(GClass1776 skill) + public override void OnSkillLevelChanged(GClass1777 skill) { // Do nothing } @@ -102,7 +102,7 @@ public override void CreateMovementContext() base.ApplyDamageInfo(damageInfo, bodyPartType, colliderType, absorbed); }*/ - public override GClass1686 ApplyShot(DamageInfo damageInfo, EBodyPart bodyPartType, EBodyPartColliderType colliderType, EArmorPlateCollider armorPlateCollider, GStruct390 shotId) + public override GClass1687 ApplyShot(DamageInfo damageInfo, EBodyPart bodyPartType, EBodyPartColliderType colliderType, EArmorPlateCollider armorPlateCollider, GStruct390 shotId) { if (damageInfo.Player != null && damageInfo.Player.iPlayer is ObservedCoopPlayer) { @@ -122,7 +122,7 @@ public override GClass1686 ApplyShot(DamageInfo damageInfo, EBodyPart bodyPartTy float damage = damageInfo.Damage; List list = ProceedDamageThroughArmor(ref damageInfo, colliderType, armorPlateCollider, true); MaterialType materialType = (flag ? MaterialType.HelmetRicochet : ((list == null || list.Count < 1) ? MaterialType.Body : list[0].Material)); - GClass1686 hitInfo = new() + GClass1687 hitInfo = new() { PoV = PointOfView, Penetrated = (string.IsNullOrEmpty(damageInfo.BlockedBy) || string.IsNullOrEmpty(damageInfo.DeflectedBy)), diff --git a/Fika.Core/Coop/Players/CoopPlayer.cs b/Fika.Core/Coop/Players/CoopPlayer.cs index 86caed10..92c551f3 100644 --- a/Fika.Core/Coop/Players/CoopPlayer.cs +++ b/Fika.Core/Coop/Players/CoopPlayer.cs @@ -54,7 +54,7 @@ public static async Task Create(int playerId, Vector3 position, Qua CharacterControllerSpawner.Mode characterControllerMode, Func getSensitivity, Func getAimingSensitivity, GInterface111 filter, int netId, IStatisticsManager statisticsManager) { - CoopPlayer player = Create(GClass1398.PLAYER_BUNDLE_NAME, playerId, position, updateQueue, armsUpdateMode, + CoopPlayer player = Create(GClass1399.PLAYER_BUNDLE_NAME, playerId, position, updateQueue, armsUpdateMode, bodyUpdateMode, characterControllerMode, getSensitivity, getAimingSensitivity, prefix, false); player.IsYourPlayer = true; @@ -64,7 +64,7 @@ public static async Task Create(int playerId, Vector3 position, Qua ISession session = Singleton>.Instance.GetClientBackEndSession(); - GClass3223 questController = new(profile, inventoryController, session, true); + GClass3228 questController = new(profile, inventoryController, session, true); questController.Init(); questController.Run(); @@ -90,11 +90,11 @@ await player.Init(rotation, layerName, pointOfView, profile, inventoryController foreach (MagazineClass magazineClass in player.Inventory.GetPlayerItems(EPlayerItems.NonQuestItems).OfType()) { - player.GClass2774_0.StrictCheckMagazine(magazineClass, true, player.Profile.MagDrillsMastering, false, false); + player.GClass2776_0.StrictCheckMagazine(magazineClass, true, player.Profile.MagDrillsMastering, false, false); } player._handsController = EmptyHandsController.smethod_5(player); - player._handsController.Spawn(1f, new Action(Class1522.class1522_0.method_0)); + player._handsController.Spawn(1f, new Action(Class1526.class1526_0.method_0)); player.AIData = new AIData(null, player); @@ -107,7 +107,7 @@ await player.Init(rotation, layerName, pointOfView, profile, inventoryController return player; } - public override void OnSkillLevelChanged(GClass1776 skill) + public override void OnSkillLevelChanged(GClass1777 skill) { NotificationManagerClass.DisplayMessageNotification(string.Format("SkillLevelUpMessage".Localized(null), skill.Id.ToString().Localized(null), @@ -215,7 +215,7 @@ public override void ApplyDamageInfo(DamageInfo damageInfo, EBodyPart bodyPartTy base.ApplyDamageInfo(damageInfo, bodyPartType, colliderType, absorbed); } - public override GClass1686 ApplyShot(DamageInfo damageInfo, EBodyPart bodyPartType, EBodyPartColliderType colliderType, EArmorPlateCollider armorPlateCollider, GStruct390 shotId) + public override GClass1687 ApplyShot(DamageInfo damageInfo, EBodyPart bodyPartType, EBodyPartColliderType colliderType, EArmorPlateCollider armorPlateCollider, GStruct390 shotId) { if (damageInfo.DamageType is EDamageType.Sniper or EDamageType.Landmine) { @@ -388,7 +388,7 @@ public void ClientApplyShot(DamageInfo damageInfo, EBodyPart bodyPartType, EBody public override void SendHeadlightsPacket(bool isSilent) { - GStruct164[] lightStates = _helmetLightControllers.Select(new Func(ClientPlayer.Class1452.class1452_0.method_0)).ToArray(); + GStruct164[] lightStates = _helmetLightControllers.Select(new Func(ClientPlayer.Class1456.class1456_0.method_0)).ToArray(); if (PacketSender != null) { @@ -464,7 +464,7 @@ public override void vmethod_0(WorldInteractiveObject interactiveObject, Interac InteractiveId = interactiveObject.Id, InteractionType = interactionResult.InteractionType, InteractionStage = EInteractionStage.Start, - ItemId = (interactionResult is GClass2981 keyInteractionResult) ? keyInteractionResult.Key.Item.Id : string.Empty + ItemId = (interactionResult is GClass2984 keyInteractionResult) ? keyInteractionResult.Key.Item.Id : string.Empty } }; PacketSender.CommonPlayerPackets.Enqueue(packet); @@ -489,7 +489,7 @@ public override void vmethod_1(WorldInteractiveObject door, InteractionResult in InteractiveId = door.Id, InteractionType = interactionResult.InteractionType, InteractionStage = EInteractionStage.Execute, - ItemId = (interactionResult is GClass2981 keyInteractionResult) ? keyInteractionResult.Key.Item.Id : string.Empty + ItemId = (interactionResult is GClass2984 keyInteractionResult) ? keyInteractionResult.Key.Item.Id : string.Empty } }; PacketSender.CommonPlayerPackets.Enqueue(packet); @@ -850,7 +850,7 @@ protected virtual void Start() { if (Equipment.GetSlot(EquipmentSlot.Dogtag).ContainedItem != null) { - GStruct415 result = InteractionsHandlerClass.Remove(Equipment.GetSlot(EquipmentSlot.Dogtag).ContainedItem, _inventoryController, false, true); + GStruct415 result = InteractionsHandlerClass.Remove(Equipment.GetSlot(EquipmentSlot.Dogtag).ContainedItem, _inventoryController, false, true); if (result.Error != null) { FikaPlugin.Instance.FikaLogger.LogWarning("CoopPlayer::Start: Error removing dog tag!"); @@ -1037,7 +1037,7 @@ public virtual void HandleInventoryPacket(in InventoryPacket packet) using BinaryReader binaryReader = new(memoryStream); try { - GStruct412 result = ToInventoryOperation(binaryReader.ReadPolymorph()); + GStruct412 result = ToInventoryOperation(binaryReader.ReadPolymorph()); InventoryOperationHandler opHandler = new(result); @@ -1045,9 +1045,9 @@ public virtual void HandleInventoryPacket(in InventoryPacket packet) // TODO: Hacky workaround to fix errors due to each client generating new IDs. Might need to find a more 'elegant' solution later. // Unknown what problems this might cause so far. - if (result.Value is GClass2874 unloadOperation) + if (result.Value is GClass2877 unloadOperation) { - if (unloadOperation.InternalOperation is GClass2885 internalSplitOperation) + if (unloadOperation.InternalOperation is GClass2888 internalSplitOperation) { Item item = internalSplitOperation.To.Item; if (item != null) @@ -1069,7 +1069,7 @@ public virtual void HandleInventoryPacket(in InventoryPacket packet) } // TODO: Same as above. - if (result.Value is GClass2885 splitOperation) + if (result.Value is GClass2888 splitOperation) { Item item = splitOperation.To.Item; if (item != null) @@ -1419,7 +1419,7 @@ public Item FindItem(string itemId) private class KeyHandler(CoopPlayer player) { private readonly CoopPlayer player = player; - public GStruct417 unlockResult; + public GStruct417 unlockResult; internal void HandleKeyEvent() { diff --git a/Fika.Core/Coop/Players/ObservedCoopPlayer.cs b/Fika.Core/Coop/Players/ObservedCoopPlayer.cs index 98236f5b..4573482c 100644 --- a/Fika.Core/Coop/Players/ObservedCoopPlayer.cs +++ b/Fika.Core/Coop/Players/ObservedCoopPlayer.cs @@ -38,11 +38,11 @@ public class ObservedCoopPlayer : CoopPlayer private float observedFixedTime = 0f; private FikaHealthBar healthBar = null; private Coroutine waitForStartRoutine; - public GClass2428 NetworkHealthController + public GClass2430 NetworkHealthController { - get => HealthController as GClass2428; + get => HealthController as GClass2430; } - private readonly GClass2167 ObservedVaultingParameters = new(); + private readonly GClass2169 ObservedVaultingParameters = new(); public override bool CanBeSnapped => false; public override EPointOfView PointOfView { get => EPointOfView.ThirdPerson; } public override AbstractHandsController HandsController @@ -122,7 +122,7 @@ public static async Task CreateObservedPlayer(int playerId, CharacterControllerSpawner.Mode characterControllerMode, Func getSensitivity, Func getAimingSensitivity, GInterface111 filter) { - ObservedCoopPlayer player = Create(GClass1398.PLAYER_BUNDLE_NAME, playerId, position, updateQueue, + ObservedCoopPlayer player = Create(GClass1399.PLAYER_BUNDLE_NAME, playerId, position, updateQueue, armsUpdateMode, bodyUpdateMode, characterControllerMode, getSensitivity, getAimingSensitivity, prefix, aiControl); @@ -171,7 +171,7 @@ public override void PlayGroundedSound(float fallHeight, float jumpHeight) base.PlayGroundedSound(fallHeight, jumpHeight); } - public override void OnSkillLevelChanged(GClass1776 skill) + public override void OnSkillLevelChanged(GClass1777 skill) { //base.OnSkillLevelChanged(skill); } @@ -241,12 +241,11 @@ public override void ManageAggressor(DamageInfo damageInfo, EBodyPart bodyPart, } bool flag = damageInfo.DidBodyDamage / HealthController.GetBodyPartHealth(bodyPart, false).Maximum >= 0.6f && HealthController.FindExistingEffect(bodyPart) != null; - player.StatisticsManager.OnEnemyDamage(damageInfo, bodyPart, - Profile.Info.Side, Profile.Info.Settings.Role, - Profile.Info.GroupId, HealthController.GetBodyPartHealth(EBodyPart.Common, false).Maximum, - flag, Vector3.Distance(player.Transform.position, Transform.position), - CurrentHour, Inventory.EquippedInSlotsTemplateIds, - HealthController.BodyPartEffects, TriggerZones); + player.StatisticsManager.OnEnemyDamage( + damageInfo, bodyPart, ProfileId, Side, Profile.Info.Settings.Role, GroupId, + HealthController.GetBodyPartHealth(EBodyPart.Common, false).Maximum, flag, + Vector3.Distance(player.Transform.position, Transform.position), CurrentHour, + Inventory.EquippedInSlotsTemplateIds, HealthController.BodyPartEffects, TriggerZones); } public override void UpdateArmsCondition() @@ -330,7 +329,7 @@ public override void ApplyDamageInfo(DamageInfo damageInfo, EBodyPart bodyPartTy } }*/ - public override GClass1686 ApplyShot(DamageInfo damageInfo, EBodyPart bodyPartType, EBodyPartColliderType colliderType, EArmorPlateCollider armorPlateCollider, GStruct390 shotId) + public override GClass1687 ApplyShot(DamageInfo damageInfo, EBodyPart bodyPartType, EBodyPartColliderType colliderType, EArmorPlateCollider armorPlateCollider, GStruct390 shotId) { if (damageInfo.DamageType == EDamageType.Sniper && MatchmakerAcceptPatches.IsServer) { @@ -381,7 +380,7 @@ public override GClass1686 ApplyShot(DamageInfo damageInfo, EBodyPart bodyPartTy float damage = damageInfo.Damage; List list = ProceedDamageThroughArmor(ref damageInfo, colliderType, armorPlateCollider, true); MaterialType materialType = (flag ? MaterialType.HelmetRicochet : ((list == null || list.Count < 1) ? MaterialType.Body : list[0].Material)); - GClass1686 hitInfo = new() + GClass1687 hitInfo = new() { PoV = PointOfView, Penetrated = (string.IsNullOrEmpty(damageInfo.BlockedBy) || string.IsNullOrEmpty(damageInfo.DeflectedBy)), @@ -441,7 +440,7 @@ public override GClass1686 ApplyShot(DamageInfo damageInfo, EBodyPart bodyPartTy float damage = damageInfo.Damage; List list = ProceedDamageThroughArmor(ref damageInfo, colliderType, armorPlateCollider, true); MaterialType materialType = (flag ? MaterialType.HelmetRicochet : ((list == null || list.Count < 1) ? MaterialType.Body : list[0].Material)); - GClass1686 hitInfo = new() + GClass1687 hitInfo = new() { PoV = PointOfView, Penetrated = (string.IsNullOrEmpty(damageInfo.BlockedBy) || string.IsNullOrEmpty(damageInfo.DeflectedBy)), @@ -829,8 +828,8 @@ public override void SetInventory(EquipmentClass equipmentClass) { Transform slotBone = PlayerBody.GetSlotBone(equipmentSlot); Transform alternativeHolsterBone = PlayerBody.GetAlternativeHolsterBone(equipmentSlot); - PlayerBody.GClass1872 gclass = new(PlayerBody, Inventory.Equipment.GetSlot(equipmentSlot), slotBone, equipmentSlot, Inventory.Equipment.GetSlot(EquipmentSlot.Backpack), alternativeHolsterBone); - PlayerBody.GClass1872 gclass2 = PlayerBody.SlotViews.AddOrReplace(equipmentSlot, gclass); + PlayerBody.GClass1874 gclass = new(PlayerBody, Inventory.Equipment.GetSlot(equipmentSlot), slotBone, equipmentSlot, Inventory.Equipment.GetSlot(EquipmentSlot.Backpack), alternativeHolsterBone); + PlayerBody.GClass1874 gclass2 = PlayerBody.SlotViews.AddOrReplace(equipmentSlot, gclass); if (gclass2 != null) { gclass2.Dispose(); @@ -1462,13 +1461,13 @@ public void Handle(Result result) } } - private class CreateHandsControllerHandler(Class1079 setInHandsOperation) + private class CreateHandsControllerHandler(Class1082 setInHandsOperation) { - public readonly Class1079 setInHandsOperation = setInHandsOperation; + public readonly Class1082 setInHandsOperation = setInHandsOperation; internal void DisposeHandler() { - Class1079 handler = setInHandsOperation; + Class1082 handler = setInHandsOperation; if (handler == null) return; handler.Dispose(); diff --git a/Fika.Core/Networking/FikaClient.cs b/Fika.Core/Networking/FikaClient.cs index 3c0d4221..72a5ac7c 100644 --- a/Fika.Core/Networking/FikaClient.cs +++ b/Fika.Core/Networking/FikaClient.cs @@ -245,7 +245,7 @@ private void OnMinePacketReceived(MinePacket packet) { if (Singleton.Instance.MineManager != null) { - NetworkGame.Class1403 mineSeeker = new() + NetworkGame.Class1407 mineSeeker = new() { minePosition = packet.MinePositon }; diff --git a/Fika.Core/Networking/FikaSerialization.cs b/Fika.Core/Networking/FikaSerialization.cs index 64c957a7..108b6f91 100644 --- a/Fika.Core/Networking/FikaSerialization.cs +++ b/Fika.Core/Networking/FikaSerialization.cs @@ -17,14 +17,14 @@ public class FikaSerialization /*public class AddressUtils { - public static void SerializeGridItemAddressDescriptor(NetDataWriter writer, GClass1538 gridItemAddressDescriptor) + public static void SerializeGridItemAddressDescriptor(NetDataWriter writer, GClass1539 gridItemAddressDescriptor) { SerializeLocationInGrid(writer, gridItemAddressDescriptor.LocationInGrid); } - public static GClass1538 DeserializeGridItemAddressDescriptor(NetDataReader reader) + public static GClass1539 DeserializeGridItemAddressDescriptor(NetDataReader reader) { - return new GClass1538() + return new GClass1539() { LocationInGrid = DeserializeLocationInGrid(reader), Container = DeserializeContainerDescriptor(reader) diff --git a/Fika.Core/Networking/FikaSerializationExtensions.cs b/Fika.Core/Networking/FikaSerializationExtensions.cs index cfc0b2a7..07bf7029 100644 --- a/Fika.Core/Networking/FikaSerializationExtensions.cs +++ b/Fika.Core/Networking/FikaSerializationExtensions.cs @@ -188,7 +188,7 @@ public static void PutAirdropItem(this NetDataWriter writer, Item item) { using MemoryStream memoryStream = new(); using BinaryWriter binaryWriter = new(memoryStream); - binaryWriter.Write(GClass1534.SerializeItem(item)); + binaryWriter.Write(GClass1535.SerializeItem(item)); writer.PutByteArray(memoryStream.ToArray()); } @@ -202,12 +202,12 @@ public static Item GetAirdropItem(this NetDataReader reader) using MemoryStream memoryStream = new(reader.GetByteArray()); using BinaryReader binaryReader = new(memoryStream); - Item item = GClass1534.DeserializeItem(Singleton.Instance, [], binaryReader.ReadEFTItemDescriptor()); + Item item = GClass1535.DeserializeItem(Singleton.Instance, [], binaryReader.ReadEFTItemDescriptor()); ContainerCollection[] containerCollections = [item as ContainerCollection]; ResourceKey[] resourceKeys = containerCollections.GetAllItemsFromCollections() - .Concat(containerCollections.Where(new Func(AirdropSynchronizableObject.Class1828.class1828_0.method_2))) - .SelectMany(new Func>(AirdropSynchronizableObject.Class1828.class1828_0.method_3)) + .Concat(containerCollections.Where(new Func(AirdropSynchronizableObject.Class1832.class1832_0.method_2))) + .SelectMany(new Func>(AirdropSynchronizableObject.Class1832.class1832_0.method_3)) .ToArray(); Singleton.Instance.LoadBundlesAndCreatePools(PoolManager.PoolsCategory.Raid, PoolManager.AssemblyType.Online, resourceKeys, JobPriority.Immediate, null, default); @@ -223,7 +223,7 @@ public static void PutItem(this NetDataWriter writer, Item item) { using MemoryStream memoryStream = new(); using BinaryWriter binaryWriter = new(memoryStream); - binaryWriter.Write(GClass1534.SerializeItem(item)); + binaryWriter.Write(GClass1535.SerializeItem(item)); writer.PutByteArray(memoryStream.ToArray()); } @@ -237,7 +237,7 @@ public static Item GetItem(this NetDataReader reader) using MemoryStream memoryStream = new(reader.GetByteArray()); using BinaryReader binaryReader = new(memoryStream); - return GClass1534.DeserializeItem(Singleton.Instance, [], binaryReader.ReadEFTItemDescriptor()); + return GClass1535.DeserializeItem(Singleton.Instance, [], binaryReader.ReadEFTItemDescriptor()); } } } diff --git a/Fika.Core/Networking/FikaServer.cs b/Fika.Core/Networking/FikaServer.cs index 8766249d..391f45ca 100644 --- a/Fika.Core/Networking/FikaServer.cs +++ b/Fika.Core/Networking/FikaServer.cs @@ -247,7 +247,7 @@ private void OnMinePacketReceived(MinePacket packet, NetPeer peer) { if (Singleton.Instance.MineManager != null) { - NetworkGame.Class1403 mineSeeker = new() + NetworkGame.Class1407 mineSeeker = new() { minePosition = packet.MinePositon }; @@ -527,7 +527,7 @@ private void OnInventoryPacketReceived(InventoryPacket packet, NetPeer peer) using BinaryReader binaryReader = new(memoryStream); try { - GStruct412 result = playerToApply.ToInventoryOperation(binaryReader.ReadPolymorph()); + GStruct412 result = playerToApply.ToInventoryOperation(binaryReader.ReadPolymorph()); InventoryOperationHandler opHandler = new() { @@ -545,9 +545,9 @@ private void OnInventoryPacketReceived(InventoryPacket packet, NetPeer peer) // TODO: Hacky workaround to fix errors due to each client generating new IDs. Might need to find a more 'elegant' solution later. // Unknown what problems this might cause so far. - if (result.Value is GClass2874 unloadOperation) + if (result.Value is GClass2877 unloadOperation) { - if (unloadOperation.InternalOperation is GClass2885 internalSplitOperation) + if (unloadOperation.InternalOperation is GClass2888 internalSplitOperation) { Item item = internalSplitOperation.To.Item; if (item != null) @@ -569,7 +569,7 @@ private void OnInventoryPacketReceived(InventoryPacket packet, NetPeer peer) } // TODO: Same as above. - if (result.Value is GClass2885 splitOperation) + if (result.Value is GClass2888 splitOperation) { Item item = splitOperation.To.Item; if (item != null) @@ -806,7 +806,7 @@ internal void HandleResult(IResult result) using MemoryStream memoryStream = new(); using BinaryWriter binaryWriter = new(memoryStream); - binaryWriter.WritePolymorph(GClass1642.FromInventoryOperation(opResult.Value, false)); + binaryWriter.WritePolymorph(GClass1643.FromInventoryOperation(opResult.Value, false)); byte[] opBytes = memoryStream.ToArray(); packet.ItemControllerExecutePacket = new() { diff --git a/Fika.Core/UI/FikaUIUtils.cs b/Fika.Core/UI/FikaUIUtils.cs index ab1ea6d7..24333391 100644 --- a/Fika.Core/UI/FikaUIUtils.cs +++ b/Fika.Core/UI/FikaUIUtils.cs @@ -39,12 +39,12 @@ public static TextMeshProUGUI CreateOverlayText(string overlayText) return text; } - public static GClass3102 ShowFikaMessage(this PreloaderUI preloaderUI, string header, string message, + public static GClass3106 ShowFikaMessage(this PreloaderUI preloaderUI, string header, string message, ErrorScreen.EButtonType buttonType, float waitingTime, Action acceptCallback, Action endTimeCallback) { Traverse preloaderUiTraverse = Traverse.Create(preloaderUI); - PreloaderUI.Class2590 messageHandler = new() + PreloaderUI.Class2594 messageHandler = new() { preloaderUI_0 = preloaderUI, acceptCallback = acceptCallback, @@ -54,7 +54,7 @@ public static GClass3102 ShowFikaMessage(this PreloaderUI preloaderUI, string he if (!AsyncWorker.CheckIsMainThread()) { FikaPlugin.Instance.FikaLogger.LogError("You are trying to show error screen from non-main thread!"); - return new GClass3102(); + return new GClass3106(); } ErrorScreen errorScreenTemplate = preloaderUiTraverse.Field("_criticalErrorScreenTemplate").GetValue(); @@ -65,19 +65,19 @@ public static GClass3102 ShowFikaMessage(this PreloaderUI preloaderUI, string he return messageHandler.errorScreen.ShowFikaMessage(header, message, new Action(messageHandler.method_1), waitingTime, new Action(messageHandler.method_2), buttonType, true); } - public static GClass3104 ShowFikaMessage(this ErrorScreen errorScreen, string title, string message, + public static GClass3108 ShowFikaMessage(this ErrorScreen errorScreen, string title, string message, Action closeManuallyCallback = null, float waitingTime = 0f, Action timeOutCallback = null, ErrorScreen.EButtonType buttonType = ErrorScreen.EButtonType.OkButton, bool removeHtml = true) { Traverse errorScreenTraverse = Traverse.Create(errorScreen); - ErrorScreen.Class2378 errorScreenHandler = new() + ErrorScreen.Class2382 errorScreenHandler = new() { errorScreen_0 = errorScreen }; if (!MonoBehaviourSingleton.Instance.CanShowErrorScreen) { - return new GClass3104(); + return new GClass3108(); } if (removeHtml) { @@ -89,7 +89,7 @@ public static GClass3104 ShowFikaMessage(this ErrorScreen errorScreen, string ti errorScreenTraverse.Field("action_1").SetValue(action_1); MethodBase baseShow = typeof(ErrorScreen).BaseType.GetMethod("Show"); - errorScreenHandler.context = (GClass3104)baseShow.Invoke(errorScreen, [closeManuallyCallback]); + errorScreenHandler.context = (GClass3108)baseShow.Invoke(errorScreen, [closeManuallyCallback]); errorScreenHandler.context.OnAccept += errorScreen.method_3; errorScreenHandler.context.OnDecline += errorScreen.method_4; errorScreenHandler.context.OnCloseSilent += errorScreen.method_4; diff --git a/Fika.Core/UI/Patches/ItemContext_Patch.cs b/Fika.Core/UI/Patches/ItemContext_Patch.cs index e62d5076..82c66853 100644 --- a/Fika.Core/UI/Patches/ItemContext_Patch.cs +++ b/Fika.Core/UI/Patches/ItemContext_Patch.cs @@ -27,12 +27,12 @@ protected override MethodBase GetTargetMethod() [PatchPrefix] private static void Prefix(ItemInfoInteractionsAbstractClass contextInteractions, Item item) { - if (contextInteractions is not GClass3038 gclass) + if (contextInteractions is not GClass3041 gclass) { return; } - ItemContextAbstractClass itemContext = Traverse.Create(contextInteractions).Field("gclass2826_0").Value; + ItemContextAbstractClass itemContext = Traverse.Create(contextInteractions).Field("gclass2828_0").Value; if (itemContext.ViewType == EItemViewType.Inventory) { if (Singleton.Instantiated && Singleton.Instance is not HideoutGameWorld) @@ -95,7 +95,7 @@ private static void Prefix(ItemInfoInteractionsAbstractClass co GameObject matchMakerUiPrefab = InternalBundleLoader.Instance.GetAssetBundle("senditemmenu").LoadAsset("SendItemMenu"); GameObject uiGameObj = Object.Instantiate(matchMakerUiPrefab); uiGameObj.transform.SetParent(GameObject.Find("Preloader UI/Preloader UI/UIContext/").transform); - InventoryScreen.GClass3137 screenController = Traverse.Create(CommonUI.Instance.InventoryScreen).Field("ScreenController").Value; + InventoryScreen.GClass3141 screenController = Traverse.Create(CommonUI.Instance.InventoryScreen).Field("ScreenController").Value; screenController.OnClose += () => { Object.Destroy(uiGameObj); }; SendItemUI sendItemUI = uiGameObj.GetComponent(); sendItemUI.PlayersDropdown.ClearOptions(); diff --git a/References/hollowed.dll b/References/hollowed.dll index 90ca2a2f..b1f95f6c 100644 Binary files a/References/hollowed.dll and b/References/hollowed.dll differ