using System.Reflection; using NitroxModel.Helper; using NitroxModel.Packets; namespace NitroxPatcher.Patches.Dynamic; /// /// Prevents non simulating players from running locally . /// Broadcasts this event on the simulating player. /// public sealed partial class RangedAttackLastTarget_StartCasting_Patch : NitroxPatch, IDynamicPatch { internal static readonly MethodInfo TARGET_METHOD = Reflect.Method((RangedAttackLastTarget t) => t.StartCasting(default)); public static void Prefix(RangedAttackLastTarget __instance) { RangedAttackLastTarget_StartCharging_Patch.BroadcastRangedAttack(__instance, RangedAttackLastTargetUpdate.ActionState.CASTING); } }