/// <summary> /// Gets a combined list of Appeals for every player that is online. /// </summary> /// <returns></returns> public static IList <DBAppeal> GetAllAppeals() { var rlist = new List <DBAppeal>(); var clientlist = WorldMgr.GetAllPlayingClients(); foreach (GameClient c in clientlist) { try { DBAppeal ap = GetAppealByPlayerName(c.Player.Name); if (ap != null) { rlist.Add(ap); } } catch { // most likely player is null due to disconnect } } TotalAppeals = rlist.Count; return(rlist); }
/// <summary> /// Creates a New Appeal /// </summary> /// <param name="Name"></param>The name of the Player who filed the appeal. /// <param name="Severity"></param>The Severity of the appeal (low, medium, high, critical) /// <param name="Status"></param>The status of the appeal (Open or InProgress) /// <param name="Text"></param>The text content of the appeal public static void CreateAppeal(GamePlayer Player, int Severity, string Status, string Text) { if (Player.IsMuted) { Player.Out.SendMessage("[Appeals]: " + LanguageMgr.GetTranslation(Player.Client.Account.Language, "Scripts.Players.Appeal.YouAreMuted"), eChatType.CT_Important, eChatLoc.CL_ChatWindow); return; } bool HasPendingAppeal = Player.TempProperties.getProperty <bool>("HasPendingAppeal"); if (HasPendingAppeal) { Player.Out.SendMessage("[Appeals]: " + LanguageMgr.GetTranslation(Player.Client.Account.Language, "Scripts.Players.Appeal.AlreadyActiveAppeal"), eChatType.CT_Important, eChatLoc.CL_ChatWindow); return; } string eText = GameServer.Database.Escape(Text); // prevent SQL injection string TimeStamp = DateTime.Now.ToLongTimeString() + " " + DateTime.Now.ToLongDateString(); DBAppeal appeal = new DBAppeal(Player.Name, Player.Client.Account.Name, Severity, Status, TimeStamp, eText); GameServer.Database.AddObject(appeal); Player.TempProperties.setProperty("HasPendingAppeal", true); Player.Out.SendMessage("[Appeals]: " + LanguageMgr.GetTranslation(Player.Client.Account.Language, "Scripts.Players.Appeal.AppealSubmitted"), eChatType.CT_Important, eChatLoc.CL_ChatWindow); Player.Out.SendMessage("[Appeals]: " + LanguageMgr.GetTranslation(Player.Client.Account.Language, "Scripts.Players.Appeal.IfYouLogOut"), eChatType.CT_Important, eChatLoc.CL_ChatWindow); Player.Out.SendPlaySound(eSoundType.Craft, 0x04); NotifyStaff(); return; }
/// <summary> /// Sets and saves the new status of the appeal /// </summary> /// <param name="name"></param>The name of the staff member making this change. /// <param name="appeal"></param>The appeal to change the status of. /// <param name="status">the new status (Open, Being Helped)</param> public static void ChangeStatus(string staffname, GamePlayer target, DBAppeal appeal, string status) { appeal.Status = status; appeal.Dirty = true; GameServer.Database.SaveObject(appeal); MessageToAllStaff("Staffmember " + staffname + " has changed the status of " + target.Name + "'s appeal to " + status + "."); target.Out.SendMessage("[Appeals]: " + LanguageMgr.GetTranslation(target.Client, "Scripts.Players.Appeal.StaffChangedStatus", staffname, status), eChatType.CT_Important, eChatLoc.CL_ChatWindow); return; }
public static void CancelAppeal(GamePlayer Player, DBAppeal appeal) { MessageToAllStaff("[Appeals]: " + Player.Name + " has canceled their appeal."); Player.Out.SendMessage("[Appeals]: " + LanguageMgr.GetTranslation(Player.Client.Account.Language, "Scripts.Players.Appeal.CanceledYourAppeal"), eChatType.CT_Important, eChatLoc.CL_ChatWindow); Player.Out.SendPlaySound(eSoundType.Craft, 0x02); GameServer.Database.DeleteObject(appeal); Player.TempProperties.setProperty("HasPendingAppeal", false); return; }
/// <summary> /// Removes an appeal from the queue and deletes it from the db. /// </summary> /// <param name="name"></param>The name of the staff member making this change. /// <param name="appeal"></param>The appeal to remove. /// <param name="Player"></param>The Player whose appeal we are closing. public static void CloseAppeal(string staffname, GamePlayer Player, DBAppeal appeal) { MessageToAllStaff("[Appeals]: " + "Staffmember " + staffname + " has just closed " + Player.Name + "'s appeal."); Player.Out.SendMessage("[Appeals]: " + LanguageMgr.GetTranslation(Player.Client.Account.Language, "Scripts.Players.Appeal.StaffClosedYourAppeal", staffname), eChatType.CT_Important, eChatLoc.CL_ChatWindow); Player.Out.SendPlaySound(eSoundType.Craft, 0x02); GameServer.Database.DeleteObject(appeal); Player.TempProperties.setProperty("HasPendingAppeal", false); return; }
public static void PlayerEnter(DOLEvent e, object sender, EventArgs args) { GamePlayer player = sender as GamePlayer; if (player == null) { return; } if (player.Client.Account.PrivLevel > (uint)ePrivLevel.Player) { StaffList.Add(player); IList <DBAppeal> Appeals = GetAllAppeals(); if (Appeals.Count > 0) { player.Out.SendMessage("[Appeals]: " + "There are " + Appeals.Count + " appeals in the queue! Use /gmappeal to work the appeals queue.", eChatType.CT_Important, eChatLoc.CL_ChatWindow); } } // Check if there is an existing appeal belonging to this player. DBAppeal appeal = GetAppealByAccountName(player.Client.Account.Name); if (appeal == null) { player.Out.SendMessage(LanguageMgr.GetTranslation(player.Client.Account.Language, "Scripts.Players.Appeal.LoginMessage"), eChatType.CT_System, eChatLoc.CL_SystemWindow); return; } if (appeal.Name != player.Name) { // players account has an appeal but it dosn't belong to this player, let's change it. appeal.Name = player.Name; appeal.Dirty = true; GameServer.Database.SaveObject(appeal); } player.Out.SendMessage("[Appeals]: " + LanguageMgr.GetTranslation(player.Client.Account.Language, "Scripts.Players.Appeal.YouHavePendingAppeal"), eChatType.CT_Important, eChatLoc.CL_ChatWindow); player.TempProperties.setProperty("HasPendingAppeal", true); NotifyStaff(); }
/// <summary> /// Creates a New Appeal /// </summary> /// <param name="Name"></param>The name of the Player who filed the appeal. /// <param name="Severity"></param>The Severity of the appeal (low, medium, high, critical) /// <param name="Status"></param>The status of the appeal (Open or InProgress) /// <param name="Text"></param>The text content of the appeal public static void CreateAppeal(GamePlayer Player, int Severity, string Status, string Text) { if (Player.IsMuted) { Player.Out.SendMessage("[Appeals]: " + LanguageMgr.GetTranslation(Player.Client.Account.Language, "Scripts.Players.Appeal.YouAreMuted"), eChatType.CT_Important, eChatLoc.CL_ChatWindow); return; } bool HasPendingAppeal = Player.TempProperties.getProperty<bool>("HasPendingAppeal"); if (HasPendingAppeal) { Player.Out.SendMessage("[Appeals]: " + LanguageMgr.GetTranslation(Player.Client.Account.Language, "Scripts.Players.Appeal.AlreadyActiveAppeal"), eChatType.CT_Important, eChatLoc.CL_ChatWindow); return; } string eText = GameServer.Database.Escape(Text); //prevent SQL injection string TimeStamp = DateTime.Now.ToLongTimeString() + " " + DateTime.Now.ToLongDateString(); DBAppeal appeal = new DBAppeal(Player.Name, Player.Client.Account.Name, Severity, Status, TimeStamp, eText); GameServer.Database.AddObject(appeal); Player.TempProperties.setProperty("HasPendingAppeal", true); Player.Out.SendMessage("[Appeals]: " + LanguageMgr.GetTranslation(Player.Client.Account.Language, "Scripts.Players.Appeal.AppealSubmitted"), eChatType.CT_Important, eChatLoc.CL_ChatWindow); Player.Out.SendMessage("[Appeals]: " + LanguageMgr.GetTranslation(Player.Client.Account.Language, "Scripts.Players.Appeal.IfYouLogOut"), eChatType.CT_Important, eChatLoc.CL_ChatWindow); Player.Out.SendPlaySound(eSoundType.Craft, 0x04); NotifyStaff(); return; }
/// <summary> /// Removes an appeal from an offline player and deletes it from the db. /// </summary> /// <param name="name"></param>The name of the staff member making this change. /// <param name="appeal"></param>The appeal to remove. public static void CloseAppeal(string staffname, DBAppeal appeal) { MessageToAllStaff("[Appeals]: " + "Staffmember " + staffname + " has just closed " + appeal.Name + "'s (offline) appeal."); GameServer.Database.DeleteObject(appeal); return; }
public void OnCommand(GameClient client, string[] args) { if (IsSpammingCommand(client.Player, "checkappeal")) { return; } if (ServerProperties.Properties.DISABLE_APPEALSYSTEM) { AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.SystemDisabled")); return; } if (args.Length < 2) { DisplaySyntax(client); return; } switch (args[1]) { #region checkappeal cancel case "remove": case "delete": case "cancel": { if (args.Length < 2) { DisplaySyntax(client); return; } //if your temporary properties says your a liar, don't even check the DB (prevent DB hammer abuse) bool HasPendingAppeal = client.Player.TempProperties.getProperty <bool>("HasPendingAppeal"); if (!HasPendingAppeal) { AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.DoNotHaveAppeal")); return; } DBAppeal appeal = AppealMgr.GetAppealByPlayerName(client.Player.Name); if (appeal != null) { if (appeal.Status == "Being Helped") { AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.CantCancelWhile")); return; } else { AppealMgr.CancelAppeal(client.Player, appeal); break; } } AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.DoNotHaveAppeal")); break; } #endregion checkappeal cancel #region checkappeal view case "display": case "show": case "list": case "view": { if (args.Length < 2) { DisplaySyntax(client); return; } bool HasPendingAppeal = client.Player.TempProperties.getProperty <bool>("HasPendingAppeal"); if (!HasPendingAppeal) { AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.NoAppealToView")); return; } DBAppeal appeal = AppealMgr.GetAppealByPlayerName(client.Player.Name); if (appeal != null) { //Let's view it. List <string> msg = new List <string>(); //note: we do not show the player his Appeals priority. msg.Add("[Player]: " + appeal.Name + ", [Status]: " + appeal.Status + ", [Issue]: " + appeal.Text + ", [Time]: " + appeal.Timestamp + ".\n"); AppealMgr.GetAllAppeals(); //refresh the total number of appeals. msg.Add(LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.CurrentStaffAvailable", AppealMgr.StaffList.Count, AppealMgr.TotalAppeals) + "\n"); msg.Add(LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.PleaseBePatient") + "\n"); msg.Add(LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.IfYouLogOut") + "\n"); msg.Add(LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.ToCancelYourAppeal")); client.Out.SendCustomTextWindow("Your Appeal", msg); return; } AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.NoAppealToView")); break; } default: { DisplaySyntax(client); return; } #endregion checkappeal view } }
public void OnCommand(GameClient client, string[] args) { if (ServerProperties.Properties.DISABLE_APPEALSYSTEM) { AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.SystemDisabled")); return; } if (args.Length < 2) { DisplaySyntax(client); return; } switch (args[1]) { #region gmappeal assist case "assist": { if (args.Length < 3) { DisplaySyntax(client); return; } int result = 0; string targetName = args[2]; GameClient targetClient = WorldMgr.GuessClientByPlayerNameAndRealm(targetName, 0, false, out result); switch (result) { case 2: // name not unique AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.NameNotUnique")); return; case 3: // exact match case 4: // guessed name break; } if (targetClient == null) { // nothing found AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.PlayerNotFound", targetName)); return; } DBAppeal appeal = AppealMgr.GetAppealByPlayerName(targetClient.Player.Name); if (appeal != null) { if (appeal.Status != "Being Helped") { AppealMgr.ChangeStatus(client.Player.Name, targetClient.Player, appeal, "Being Helped"); string message = LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.RandMessage" + Util.Random(4), targetClient.Player.Name); client.Player.TempProperties.setProperty("AppealAssist", targetClient.Player); client.Player.SendPrivateMessage(targetClient.Player, message); targetClient.Out.SendPlaySound(eSoundType.Craft, 0x04); return; } else { AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.BeingHelped")); break; } } AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.DoesntHaveAppeal")); break; } #endregion gmappeal assist #region gmappeal view case "view": { if (args.Length < 3) { DisplaySyntax(client); return; } int result = 0; string targetName = args[2]; GameClient targetClient = WorldMgr.GuessClientByPlayerNameAndRealm(targetName, 0, false, out result); switch (result) { case 2: // name not unique AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.NameNotUnique")); return; case 3: // exact match case 4: // guessed name break; } if (targetClient == null) { // nothing found AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.PlayerNotFound", targetName)); return; } DBAppeal appeal = AppealMgr.GetAppealByPlayerName(targetClient.Player.Name); if (appeal != null) { //Let's view it. List <string> msg = new List <string>(); msg.Add("[Appeal]: " + appeal.Name + ", [Status]: " + appeal.Status + ", [Priority]: " + appeal.SeverityToName + " [Issue]: " + appeal.Text + ", [Time]: " + appeal.Timestamp + ".\n"); msg.Add("To assist them with the appeal use /gmappeal assist <player name>.\n"); msg.Add("To jump yourself to the player use /gmappeal jumpto.\n"); msg.Add("For a full list of possible commands, use /gmappeal (with no arguments)"); client.Out.SendCustomTextWindow("Viewing " + appeal.Name + "'s Appeal", msg); return; } AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.DoesntHaveAppeal")); break; } #endregion gmappeal view #region gmappeal release case "release": { if (args.Length < 3) { DisplaySyntax(client); return; } int result = 0; string targetName = args[2]; GameClient targetClient = WorldMgr.GuessClientByPlayerNameAndRealm(targetName, 0, false, out result); switch (result) { case 2: // name not unique AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.NameNotUnique")); return; case 3: // exact match case 4: // guessed name break; } if (targetClient == null) { // nothing found AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.PlayerNotFound", targetName)); return; } DBAppeal appeal = AppealMgr.GetAppealByPlayerName(targetClient.Player.Name); if (appeal != null) { if (appeal.Status == "Being Helped") { AppealMgr.ChangeStatus(client.Player.Name, targetClient.Player, appeal, "Open"); client.Player.TempProperties.removeProperty("AppealAssist"); return; } else { AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.NotBeingHelped")); return; } } AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.DoesntHaveAppeal")); return; } #endregion gmappeal release #region gmappeal list case "list": case "listall": { int low = 0; int med = 0; int high = 0; int crit = 0; string caption; IList <DBAppeal> appeallist; List <string> msg = new List <string>(); if (args[1] == "listall") { caption = "Offline and Online Player Appeals"; appeallist = AppealMgr.GetAllAppealsOffline(); } else { caption = "Online Player Appeals"; appeallist = AppealMgr.GetAllAppeals(); } if (appeallist.Count < 1 || appeallist == null) { AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.NoAppealsinQueue")); return; } foreach (DBAppeal a in appeallist) { switch (a.Severity) { case (int)AppealMgr.eSeverity.Low: low++; break; case (int)AppealMgr.eSeverity.Medium: med++; break; case (int)AppealMgr.eSeverity.High: high++; break; case (int)AppealMgr.eSeverity.Critical: crit++; break; } } int total = appeallist.Count; msg.Add(LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.CurrentStaffAvailable", AppealMgr.StaffList.Count, total) + "\n"); msg.Add("Appeals ordered by severity: "); msg.Add("Critical:" + crit + ", High:" + high + " Med:" + med + ", Low:" + low + ".\n"); if (crit > 0) { msg.Add("Critical priority appeals:\n"); foreach (DBAppeal a in appeallist) { if (a.Severity == (int)AppealMgr.eSeverity.Critical) { msg.Add("[Name]: " + a.Name + ", [Status]: " + a.Status + ", [Priority]: " + a.SeverityToName + " [Issue]: " + a.Text + ", [Time]: " + a.Timestamp + ".\n"); } } } if (high > 0) { msg.Add("High priority appeals:\n"); foreach (DBAppeal a in appeallist) { if (a.Severity == (int)AppealMgr.eSeverity.High) { msg.Add("[Name]: " + a.Name + ", [Status]: " + a.Status + ", [Priority]: " + a.SeverityToName + ", [Issue]: " + a.Text + ", [Time]: " + a.Timestamp + ".\n"); } } } if (med > 0) { msg.Add("Medium priority Appeals:\n"); foreach (DBAppeal a in appeallist) { if (a.Severity == (int)AppealMgr.eSeverity.Medium) { msg.Add("[Name]: " + a.Name + ", [Status]: " + a.Status + ", [Priority]: " + a.SeverityToName + ", [Issue]: " + a.Text + ", [Time]: " + a.Timestamp + ".\n"); } } } if (low > 0) { msg.Add("Low priority appeals:\n"); foreach (DBAppeal a in appeallist) { if (a.Severity == (int)AppealMgr.eSeverity.Low) { msg.Add("[Name]: " + a.Name + ", [Status]: " + a.Status + ", [Priority]: " + a.SeverityToName + ", [Issue]: " + a.Text + ", [Time]: " + a.Timestamp + ".\n"); } } } client.Out.SendCustomTextWindow(caption, msg); } break; #endregion gmappeal list #region gmappeal close case "close": { if (args.Length < 3) { DisplaySyntax(client); return; } int result = 0; string targetName = args[2]; GameClient targetClient = WorldMgr.GuessClientByPlayerNameAndRealm(targetName, 0, false, out result); switch (result) { case 2: // name not unique AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.NameNotUnique")); return; case 3: // exact match case 4: // guessed name break; } if (targetClient == null) { // nothing found AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.PlayerNotFound", targetName)); return; } DBAppeal appeal = AppealMgr.GetAppealByPlayerName(targetClient.Player.Name); if (appeal == null) { AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.DoesntHaveAppeal")); return; } AppealMgr.CloseAppeal(client.Player.Name, targetClient.Player, appeal); client.Player.TempProperties.removeProperty("AppealAssist"); return; } #endregion gmappeal close #region gmappeal closeoffline case "closeoffline": { if (args.Length < 3) { DisplaySyntax(client); return; } string targetName = args[2]; DBAppeal appeal = AppealMgr.GetAppealByPlayerName(targetName); if (appeal == null) { AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.CantFindAppeal")); return; } AppealMgr.CloseAppeal(client.Player.Name, appeal); //just incase the player is actually online let's check so we can handle it properly string targetNameTwo = args[2]; int resultTwo = 0; GameClient targetClient = WorldMgr.GuessClientByPlayerNameAndRealm(targetNameTwo, 0, false, out resultTwo); switch (resultTwo) { case 2: // name not unique AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.NameNotUnique")); return; case 3: // exact match case 4: // guessed name break; } if (targetClient == null) { // player isn't online so we're fine. return; } else { //cleaning up the player since he really was online. AppealMgr.MessageToClient(targetClient, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.StaffClosedYourAppeal", client.Player.Name)); targetClient.Out.SendPlaySound(eSoundType.Craft, 0x02); targetClient.Player.TempProperties.setProperty("HasPendingAppeal", false); } return; } #endregion gmappeal closeoffline #region gmappeal jumpto case "jumpto": { try { GamePlayer p = client.Player.TempProperties.getProperty <GamePlayer>("AppealAssist"); if (p.ObjectState == GameObject.eObjectState.Active) { GameLocation oldlocation = new GameLocation("old", client.Player.CurrentRegionID, client.Player.X, client.Player.Y, client.Player.Z); client.Player.TempProperties.setProperty("AppealJumpOld", oldlocation); client.Player.MoveTo(p.CurrentRegionID, p.X, p.Y, p.Z, p.Heading); } break; } catch { AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.MustBeAssisting")); break; } } case "jumpback": { GameLocation jumpback = client.Player.TempProperties.getProperty <GameLocation>("AppealJumpOld"); if (jumpback != null) { client.Player.MoveTo(jumpback); //client.Player.TempProperties.removeProperty("AppealJumpOld"); break; } else { AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.NoLocationToJump")); } break; } #endregion gmappeal jumpto #region gmappeal mute case "mute": { bool mute = client.Player.TempProperties.getProperty <bool>("AppealMute"); if (mute == false) { client.Player.TempProperties.setProperty("AppealMute", true); AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.NoLongerReceiveMsg")); AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.UseCmdTurnBackOn")); AppealMgr.StaffList.Remove(client.Player); } else { client.Player.TempProperties.setProperty("AppealMute", false); AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.NowReceiveMsg")); AppealMgr.MessageToClient(client, LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Appeal.UseCmdTurnBackOff")); AppealMgr.StaffList.Add(client.Player); } break; } #endregion gmappeal mute #region gmappeal commands case "commands": case "cmds": case "help": //List all the commands in a pop up window List <string> helpmsg = new List <string>(); helpmsg.Add("Commands for server staff to assist players with their Appeals."); helpmsg.Add("/gmappeal view <player name> - Views the appeal of a specific player."); helpmsg.Add("/gmappeal list - Lists all the current Appeals from online players only, in a window."); helpmsg.Add("/gmappeal listall - Will list Appeals of both offline and online players, in a window."); helpmsg.Add("/gmappeal assist <player name> - Take ownership of the player's appeal and lets other staff know you are helping this player."); helpmsg.Add("/gmappeal jumpto - Will jump you to the player you are currently assisting (must use /gmappeal assist first)."); helpmsg.Add("/gmappeal jumpback - Will jump you back to where you were after you've helped the player (must use /gmappeal jumpto first)."); helpmsg.Add("/gmappeal close <player name> - Closes the appeal and removes it from the queue."); helpmsg.Add("/gmappeal closeoffline <player name> - Closes an appeal of a player who is not online."); helpmsg.Add("/gmappeal release <player name> - Releases ownership of the player's appeal so someone else can help them."); helpmsg.Add("/gmappeal mute - Toggles receiving appeal notices, for yourself, for this session."); client.Out.SendCustomTextWindow("/gmappeal commands list", helpmsg); break; #endregion gmappeal commands default: { DisplaySyntax(client); return; } } return; }
public static DBAppeal GetAppealByAccountName(string name) { DBAppeal appeal = GameServer.Database.SelectObjects <DBAppeal>("`Account` = @Account", new QueryParameter("@Account", name)).FirstOrDefault(); return(appeal); }
public static DBAppeal GetAppealByPlayerName(string name) { DBAppeal appeal = GameServer.Database.SelectObjects <DBAppeal>("`Name` = @Name", new QueryParameter("@Name", name)).FirstOrDefault(); return(appeal); }
public static DBAppeal GetAppealByAccountName(string name) { DBAppeal appeal = DOLDB <DBAppeal> .SelectObject(DB.Column("Account").IsEqualTo(name)); return(appeal); }
public static DBAppeal GetAppealByAccountName(string name) { DBAppeal appeal = GameServer.Database.SelectObject <DBAppeal>("`Account` = '" + GameServer.Database.Escape(name) + "'"); return(appeal); }
public static DBAppeal GetAppealByPlayerName(string name) { DBAppeal appeal = DOLDB <DBAppeal> .SelectObject(DB.Column(nameof(DBAppeal.Name)).IsEqualTo(name)); return(appeal); }