/// <summary> /// Player continues in his rule violation report /// </summary> /// <param name="player"></param> /// <param name="message"></param> public static void PlayerContinueRuleViolationReport(Player player, string message) { Violation violation = getPlayerRuleViolationReport(player); if (violation != null) { if (violation.Gamemaster != null) { violation.Gamemaster.Connection.SendCreatureSay(player, TalkType.RuleViolationContinue, message); player.Connection.SendTextMessage((byte)MessageType.StatusSmall, "Message sent to Gamemaster."); } } }
/// <summary> /// Close a player rule violation /// </summary> /// <param name="player"></param> public static void PlayerCloseRuleViolation(Player player) { Violation violation = getPlayerRuleViolationReport(player); if (violation != null) { player.Connection.SendLockRuleViolationReport(); Channel ruleViolationChannel = Channels.getChannelById(ChannelID.RuleViolations); if (violation.IsOpen && ruleViolationChannel != null) { foreach (Player viewer in ruleViolationChannel.ActiveViewers) { viewer.Connection.SendRuleViolationReportRemoval(player.Name); } } } }
/// <summary> /// Gamemaster processes a rule violation report /// </summary> /// <param name="gamemaster"></param> /// <param name="owner"></param> public static void PlayerProcessRuleViolation(Player gamemaster, Player owner) { Violation violation = getPlayerRuleViolationReport(owner); if (violation != null) { violation.Gamemaster = gamemaster; violation.IsOpen = false; Channel ruleViolationChannel = Channels.getChannelById(ChannelID.RuleViolations); if (ruleViolationChannel != null) { foreach (Player viewer in ruleViolationChannel.ActiveViewers) { viewer.Connection.SendRuleViolationReportRemoval(owner.Name); } } } }
/// <summary> /// Player closes a rule violation report /// </summary> /// <param name="player"></param> public static void CloseRuleViolationReport(Player player) { Violation violation = getPlayerRuleViolationReport(player); if (violation != null) { rule_violations.Remove(violation); player.Connection.SendLockRuleViolationReport(); Channel channel = Channels.getChannelById(ChannelID.RuleViolations); if (channel != null) { foreach (Player viewer in channel.ActiveViewers) { viewer.Connection.SendRuleViolationReportRemoval(player.Name); } } } }
/// <summary> /// Player reports a rule violation with Ctrl + R /// </summary> /// <param name="player"></param> /// <param name="Message"></param> public static void PlayerReportRuleViolation(Player player, string message) { CancelPlayerRuleViolation(player); Violation violation = new Violation(); violation.Player = player; violation.Message = message; violation.Time = 0; violation.IsOpen = true; rule_violations.Add(violation); Channel ruleViolationChannel = Channels.getChannelById(ChannelID.RuleViolations); if (ruleViolationChannel != null) { foreach (Player viewer in ruleViolationChannel.ActiveViewers) { viewer.Connection.SendMessageToChannel(player, TalkType.RuleViolationChannel, message, (short)ChannelID.RuleViolations, violation.Time); } } }