public static void ChangeCopyAcsPostfix(CvsAccessoryChange __instance) { var traverse = Traverse.Create(__instance); var selSrc = traverse.Field("selSrc").GetValue <int>(); var selDst = traverse.Field("selDst").GetValue <int>(); OnChangeAcs(__instance, selSrc, selDst); }
private static void OnChangeAcs(CvsAccessoryChange instance) { if (AccessoryTransferred == null) { return; } try { var traverse = Traverse.Create(instance); var selSrc = traverse.Field("selSrc").GetValue <int>(); var selDst = traverse.Field("selDst").GetValue <int>(); var args = new AccessoryTransferEventArgs(selSrc, selDst); AccessoryTransferred(instance, args); } catch (Exception ex) { KoikatuAPI.Log(LogLevel.Error, "Crash in AccessoryTransferred event: " + ex); } }
public static void ChangeCopyAcsPostfix(CvsAccessoryChange __instance) { OnChangeAcs(__instance); }
public static void ChangeCopyAcsPostfix(CvsAccessoryChange __instance) { OnChangeAcs(__instance, __instance.selSrc, __instance.selDst); }