HideDress/SkinHide/Patches/PlayerModelViewPatch.cs
2022-08-29 08:18:34 +08:00

26 lines
678 B
C#

using Aki.Reflection.Patching;
using Aki.Reflection.Utils;
using System.Reflection;
using System.Threading.Tasks;
using EFT;
using EFT.UI;
namespace SkinHide.Patches
{
public class PlayerModelViewPatch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return typeof(PlayerModelView).GetMethod("method_0", PatchConstants.PrivateFlags);
}
[PatchPostfix]
private static async void PatchPostfix(Task __result, PlayerModelView __instance)
{
await __result;
SkinHidePlugin.PlayerModelView = __instance.GetComponentInChildren<PlayerBody>();
}
}
}