internal static bool UpdateBegin(global::Terraria.Player player, ref int i) { var res = Hooks.Player.PreUpdate?.Invoke(player, ref i); if (res.HasValue) { return(res.Value == HookResult.Continue); } return(true); }
/// <summary> /// This method is injected on the if block that surrounds the player name /// collision kick. /// </summary> internal static bool NameCollision(global::Terraria.Player player) { var res = Hooks.Player.NameCollision?.Invoke(player); if (res.HasValue) { return(res.Value == HookResult.Continue); } return(true); }
internal static bool HurtBegin(ref double returnValue, global::Terraria.Player player, ref int Damage, ref int hitDirection, ref bool pvp, ref bool quiet, ref string deathText, ref bool Crit, ref int cooldownCounter) { var res = Hooks.Player.Hurt?.Invoke(ref returnValue, player, ref Damage, ref hitDirection, ref pvp, ref quiet, ref deathText, ref Crit, ref cooldownCounter); if (res.HasValue) { return(res.Value == HookResult.Continue); } return(true); }
internal static bool KillMeBegin(global::Terraria.Player player, ref double dmg, ref int hitDirection, ref bool pvp, ref string deathText) { var res = Hooks.Player.PreKillMe?.Invoke(player, ref dmg, ref hitDirection, ref pvp, ref deathText); if (res.HasValue) { return(res.Value == HookResult.Continue); } return(true); }
internal static bool KillMeBegin(global::Terraria.Player player, PlayerDeathReason damageSource, ref double dmg, ref int hitDirection, ref bool pvp) { var res = Hooks.Player.PreKillMe?.Invoke(player, damageSource, ref dmg, ref hitDirection, ref pvp); if (res.HasValue) { return(res.Value == HookResult.Continue); } return(true); }
internal static bool ResetEffectsBegin(global::Terraria.Player player) { var res = Hooks.Player.PreResetEffects?.Invoke(player); if (res.HasValue) { return(res.Value == HookResult.Continue); } return(true); }
internal static void UpdateEnd(global::Terraria.Player player, int i) => Hooks.Player.PostUpdate?.Invoke(player, i);
internal static void KillMeEnd(global::Terraria.Player player, PlayerDeathReason damageSource, double dmg, int hitDirection, bool pvp) => Hooks.Player.PostKillMe?.Invoke(player, damageSource, dmg, hitDirection, pvp);
internal static void UpdateJumpHeightEnd(global::Terraria.Player player) => Hooks.Player.PostUpdateJumpHeight?.Invoke(player);
internal static void KillMeEnd(global::Terraria.Player player, double dmg, int hitDirection, bool pvp, string deathText) => Hooks.Player.PostKillMe?.Invoke(player, dmg, hitDirection, pvp, deathText);
internal static void ResetEffectsEnd(global::Terraria.Player player) => Hooks.Player.PostResetEffects?.Invoke(player);