private static void Postfix(TeleportWorld __instance, Humanoid human, bool hold) { try { PostfixEvent?.Invoke(__instance, human, hold); } catch (Exception ex) { Logger.LogError(ex.Message + Environment.NewLine + ex.StackTrace); } }
private static void Postfix(ZNetScene __instance) { try { PostfixEvent?.Invoke(__instance); } catch (Exception ex) { Logger.LogError(ex.Message + Environment.NewLine + ex.StackTrace); } }
private static void Postfix(TeleportWorld __instance, long sender, string tag) { try { PostfixEvent?.Invoke(__instance, sender, tag); } catch (Exception ex) { Logger.LogError(ex.Message + Environment.NewLine + ex.StackTrace); } }
private static void Postfix(string language) { try { PostfixEvent?.Invoke(language); } catch (Exception ex) { Logger.LogError(ex.Message + Environment.NewLine + ex.StackTrace); } }
private static void Postfix(Minimap __instance, int x, int y, bool __result) { try { PostfixEvent?.Invoke(__instance, x, y, __result); } catch (Exception ex) { Logger.LogError(ex.Message + Environment.NewLine + ex.StackTrace); } }
private static void Postfix(Player __instance, Piece piece, ref bool __result) { try { PostfixEvent?.Invoke(__instance, piece, __result); } catch (Exception ex) { Logger.LogError(ex.Message + Environment.NewLine + ex.StackTrace); } }
private static void Postfix(Game __instance) { Logger.LogInfo($"{__instance} started."); try { PostfixEvent?.Invoke(__instance); } catch (Exception ex) { Logger.LogError(ex.Message + Environment.NewLine + ex.StackTrace); } }
private static string Postfix(string result, string word) { var failed = string.Format("[{0}]", word); if (result != failed) { return(result); } if (PostfixEvent.Invoke(word, out var translated)) { return(translated); } return(failed); }