public IActionResult SelectBackground(RadioSelectModel <BackgroundModel> model) { var pcId = Convert.ToInt32(Decrypt(model.PcId)); SendCommand(new SetPCBackgroundCommand { PcId = pcId, BackgroundId = model.SelectedOptionId }); return(RedirectToAction(nameof(SelectAlignment), new { model.PcId, model.CampaignId })); }
public IActionResult SelectSubRace(RadioSelectModel <SubRaceModel> model) { var pcId = Convert.ToInt32(Decrypt(model.PcId)); SendCommand(new SetPCSubRaceCommand { PcId = pcId, SubRaceId = model.SelectedOptionId }); return(RedirectToAction(nameof(SelectClass), new { model.PcId, model.CampaignId })); }
public IActionResult SelectAlignment(RadioSelectModel <AlignmentModel> model) { var pcId = Convert.ToInt32(Decrypt(model.PcId)); SendCommand(new SetPCAlignmentCommand { PcId = pcId, AlignmentId = model.SelectedOptionId }); return(RedirectToAction(nameof(SelectLanguages), new { model.PcId, model.CampaignId })); }
//[HttpPost] //public IActionResult LevelUp(LevelUpModel model) //{ //} public IActionResult SelectRace(string pcId, int campaignId) { var model = new RadioSelectModel <RaceModel> { PcId = pcId, CampaignId = campaignId }; var query = new GetRaceOptionsQuery { CampaignId = campaignId }; model.OptionModels = _mapper.Map <List <RaceDTO>, List <RaceModel> >(SendQuery <GetRaceOptionsQuery, IEnumerable <RaceDTO> >(query).ToList()); return(View(model)); }
public IActionResult SelectAlignment(string pcId, int campaignId) { var model = new RadioSelectModel <AlignmentModel> { PcId = pcId, CampaignId = campaignId }; var query = new GetAlignmentsQuery(); model.OptionModels = _mapper.Map <List <AlignmentDTO>, List <AlignmentModel> >(SendQuery <GetAlignmentsQuery, IEnumerable <AlignmentDTO> >(query).ToList()); return(View(model)); }
public IActionResult SelectClass(RadioSelectModel <ClassModel> model) { var pcId = Convert.ToInt32(Decrypt(model.PcId)); SendCommand(new SetPCClassCommand { PcId = pcId, ClassId = model.SelectedOptionId }); return(RedirectToAction(nameof(SelectArchetype), new { pcId = model.PcId, campaignId = model.CampaignId, classId = model.SelectedOptionId })); }
public IActionResult SelectSubRace(string pcId, int campaignId, int raceId) { var model = new RadioSelectModel <SubRaceModel> { PcId = pcId, CampaignId = campaignId }; var query = new GetSubRaceOptionsQuery { CampaignId = campaignId, RaceId = raceId }; var subRaces = SendQuery <GetSubRaceOptionsQuery, IEnumerable <SubRaceDTO> >(query).ToList(); if (subRaces.Count() > 0) { model.OptionModels = _mapper.Map <List <SubRaceDTO>, List <SubRaceModel> >(subRaces); return(View(model)); } return(RedirectToAction(nameof(SelectClass), new { pcId, campaignId })); }