Beispiel #1
0
        public async Task <IActionResult> AddQuest(int id)
        {
            var user = await _authorizerService.Authorize(HttpContext);

            if (user == null)
            {
                return(Redirect(GlobalConstants.Default_Login_Page));
            }

            var npc = _NPCsService.ById(id);

            if (npc == null)
            {
                return(Redirect(NPCs_Root_Path));
            }

            var model = new AddQuestToNPCInputModel
            {
                NPCId   = id,
                NPCName = npc.Name,
                Quests  = _questsService.All()
            };

            return(View(model));
        }
Beispiel #2
0
        public IActionResult Index()
        {
            var model = _questsService.All()?.ToList();

            return(View(model));
        }