public virtual ActionResult DeleteQuestConnection(int Id, int QuestId) { QuestWriterProcedures.DeleteQuestConnection(Id); QuestWriterProcedures.LogQuestWriterAction(User.Identity.Name, QuestId, " deleted connection Id <b>" + Id + "</b>."); return(RedirectToAction(MVC.QuestWriter.ShowAllQuestConnections(QuestId))); }
public virtual ActionResult QuestStartSend(QuestStart input) { var newId = QuestWriterProcedures.SaveQuestStart(input); QuestWriterProcedures.LogQuestWriterAction(User.Identity.Name, newId, " began new quest with Id <b>" + newId + "</b>."); return(RedirectToAction(MVC.QuestWriter.QuestStart(newId))); }
public virtual ActionResult QuestConnectionSend(QuestConnectionFormViewModel input) { var id = QuestWriterProcedures.SaveQuestConnection(input.QuestConnection); QuestWriterProcedures.LogQuestWriterAction(User.Identity.Name, input.QuestConnection.QuestId, " saved connection Id <b>" + id + "</b>."); return(RedirectToAction(MVC.QuestWriter.QuestConnection(id, input.QuestConnection.QuestId, input.QuestConnection.QuestStateFromId, input.QuestConnection.QuestStateToId))); }
public virtual ActionResult QuestStateSend(QuestStateFormViewModel input) { var id = QuestWriterProcedures.SaveQuestState(input.QuestState); QuestWriterProcedures.LogQuestWriterAction(User.Identity.Name, input.QuestState.QuestId, " saved quest state Id <b>" + input.QuestState.Id + "</b>."); return(RedirectToAction(MVC.QuestWriter.QuestState(id, input.QuestState.QuestId, -1))); }
public virtual ActionResult QuestEndSend(QuestEndFormViewModel input) { IQuestRepository repo = new EFQuestRepository(); var state = repo.QuestStates.FirstOrDefault(q => q.Id == input.ParentQuestState.Id); var savedId = QuestWriterProcedures.SaveQuestEnd(input.QuestEnd, state); QuestWriterProcedures.LogQuestWriterAction(User.Identity.Name, state.QuestId, " saved quest end Id <b>" + savedId + "</b>."); return(RedirectToAction(MVC.QuestWriter.QuestEnd(savedId, state.Id, input.QuestEnd.QuestId))); }
public virtual ActionResult QuestConnectionRequirementSend(QuestConnectionRequirementFormViewModel input) { IQuestRepository repo = new EFQuestRepository(); var connection = repo.QuestConnections.FirstOrDefault(q => q.Id == input.QuestConnection.Id); var savedId = QuestWriterProcedures.SaveQuestConnectionRequirement(input.QuestConnectionRequirement, connection); QuestWriterProcedures.LogQuestWriterAction(User.Identity.Name, connection.QuestId, " saved connection requirement Id <b>" + savedId + "</b>."); return(RedirectToAction(MVC.QuestWriter.QuestConnectionRequirement(savedId, input.QuestConnectionRequirement.QuestId, connection.Id))); }
public virtual ActionResult QuestStateDelete(int Id) { IQuestRepository repo = new EFQuestRepository(); var questState = repo.QuestStates.FirstOrDefault(q => q.Id == Id); QuestWriterProcedures.DeleteQuestState(Id); QuestWriterProcedures.LogQuestWriterAction(User.Identity.Name, questState.QuestId, " deleted quest state Id <b>" + questState.Id + "</b>."); return(RedirectToAction(MVC.QuestWriter.ShowAllQuestStates(questState.QuestId))); }
public virtual ActionResult QuestEndDelete(int Id) { IQuestRepository repo = new EFQuestRepository(); var questEnd = repo.QuestEnds.FirstOrDefault(q => q.Id == Id); var state = repo.QuestStates.FirstOrDefault(s => s.Id == questEnd.QuestStateId.Id); QuestWriterProcedures.LogQuestWriterAction(User.Identity.Name, state.QuestId, " deleted quest state preaction Id <b>" + Id + "</b>."); QuestWriterProcedures.DeleteQuestEnd(Id); return(RedirectToAction(MVC.QuestWriter.QuestState(questEnd.QuestStateId.Id, state.Id, -1))); }
public virtual ActionResult QuestConnectionRequirementDelete(int Id) { IQuestRepository repo = new EFQuestRepository(); var questConnectionRequirement = repo.QuestConnectionRequirements.FirstOrDefault(q => q.Id == Id); var connection = repo.QuestConnections.FirstOrDefault(q => q.Id == questConnectionRequirement.QuestConnectionId.Id); QuestWriterProcedures.DeleteQuestConnectionRequirement(Id); QuestWriterProcedures.LogQuestWriterAction(User.Identity.Name, connection.QuestId, " deleted connection requirement Id <b>" + Id + "</b>."); return(RedirectToAction(MVC.QuestWriter.QuestConnection(connection.Id, connection.QuestId, connection.QuestStateFromId, connection.QuestStateToId))); }
public virtual ActionResult MarkQuestAsLive(int Id, bool live) { // assert only admins can view this if (!User.IsInRole(PvPStatics.Permissions_Admin)) { return(RedirectToAction(MVC.QuestWriter.QuestStart(Id))); } QuestWriterProcedures.MarkQuestAsLive(Id, live); QuestWriterProcedures.LogQuestWriterAction(User.Identity.Name, Id, " marked quest Id <b>" + Id + "</b> as live."); return(RedirectToAction(MVC.QuestWriter.QuestStart(Id))); }