HideDress/SkinHide/Patches/PlayerModelViewPatch.cs
2022-05-06 15:17:35 +08:00

26 lines
642 B
C#

using Aki.Reflection.Patching;
using Aki.Reflection.Utils;
using System.Reflection;
using EFT.UI;
using System.Threading.Tasks;
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.gameObject;
}
}
}