HideDress/SkinHide/Patches/PlayerModelViewPatch.cs

25 lines
629 B
C#
Raw Normal View History

2022-05-06 15:17:35 +08:00
using Aki.Reflection.Patching;
using Aki.Reflection.Utils;
using System.Reflection;
using System.Threading.Tasks;
2022-05-30 14:55:33 +08:00
using EFT.UI;
2022-05-06 15:17:35 +08:00
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;
2022-08-31 23:12:17 +08:00
SkinHidePlugin.PlayerModelView = __instance.PlayerBody;
2022-05-06 15:17:35 +08:00
}
}
}