-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
51 additions
and
2 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
Fika.Core/Coop/Patches/Bugfixes/PartyInfoPanel_method_3_Patch.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using EFT; | ||
using EFT.InventoryLogic; | ||
using EFT.UI.Matchmaker; | ||
using SPT.Reflection.Patching; | ||
using System.Reflection; | ||
|
||
namespace Fika.Core.Coop.Patches | ||
{ | ||
/// <summary> | ||
/// Borrowed from Tyfon's UI Fixes with permission, a patch that fixes a bug if you inspect a player during loading when the controller is instantiated <br/><br/> | ||
/// Source code here: <see href="https://github.com/tyfon7/UIFixes/blob/main/src/Patches/FixPlayerInspectPatch.cs"/> | ||
/// </summary> | ||
public class PartyInfoPanel_method_3_Patch : ModulePatch | ||
{ | ||
protected override MethodBase GetTargetMethod() | ||
{ | ||
return typeof(PartyInfoPanel).GetMethod(nameof(PartyInfoPanel.method_3)); | ||
} | ||
|
||
[PatchPrefix] | ||
public static bool Prefix(GClass1323 raidPlayer) | ||
{ | ||
InventoryEquipment equipment = raidPlayer.PlayerVisualRepresentation.Equipment; | ||
if (equipment.CurrentAddress.GetOwnerOrNull() is Player.SinglePlayerInventoryController) | ||
{ | ||
return false; | ||
} | ||
|
||
return true; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters