public static void KillWithPermadeath(Player player, string death_msg) { if (Main.netMode != 0) { var protocol = new PlayerPermaDeathProtocol(player.whoAmI, death_msg); } else { PlayerHelpers.ApplyPermaDeath(player, death_msg); } }
//// public static void KillWithPermadeath(Player player, string deathMsg) { if (Main.netMode != 0) { PlayerPermaDeathProtocol.SendToAll(player.whoAmI, deathMsg); } else { PlayerHelpers.ApplyPermaDeath(player, deathMsg); } }
//// /// <summary> /// Kills a player permanently (as if hardcore mode). /// </summary> /// <param name="player"></param> /// <param name="deathMsg"></param> public static void KillWithPermadeath(Player player, string deathMsg) { if (Main.netMode == NetmodeID.MultiplayerClient) { PlayerPermaDeathProtocol.BroadcastFromClient(player.whoAmI, deathMsg); } else if (Main.netMode == NetmodeID.Server) { PlayerPermaDeathProtocol.BroadcastFromServer(player.whoAmI, deathMsg, false); PlayerLibraries.ApplyPermaDeathState(player, deathMsg); } else { PlayerLibraries.ApplyPermaDeathState(player, deathMsg); } }