protected override void ReadPacket(BinaryReader BReader) { if (BReader.ReadBoolean()) { Details = new MonsterDetails(BReader); } }
public IActionResult GetMonsterDetails(int id) { var monster = _repo.GetById(id); var prof = _profRepo.GetProficiencyByMonsterId(id); var sense = _senseRepo.GetSensesByMonsterId(id); var abilities = _abilityRepo.GetAbilityByMonsterId(id); var Monsterdetails = new MonsterDetails() { Monster = monster, proficiency = prof, senses = sense, abilities = abilities }; return(Ok(Monsterdetails)); }
public MonsterObject(MonsterDetails D) { if (D == null) { return; } WeaponShape = -1; ObjectID = D.ObjectID; Name = D.Name; Direction = D.Direction; Location = D.Location; ActualLocation = D.Location; Effect = D.Effect; Dead = D.Dead; Frames = MonsterFrames.Monster[1]; PrimaryLibrary = Libraries.Monsters[D.Image / 10]; switch (D.Image) { case 0: break; case 1: Frames = MonsterFrames.Monster[0]; BaseIndex = 280; break; case 25: case 26: case 27: case 100: case 160: case 161: case 162: case 163: BaseIndex = 360 * (D.Image % 10); break; } PopupSound = (SoundList)(200 + D.Image * 10); AppearSound = (SoundList)(200 + D.Image * 10 + 1); AttackSound = (SoundList)(200 + D.Image * 10 + 2); //AppearSound = 200 + P.Details.Image * 10 + 3; Spell Sound FlinchSound = (SoundList)(200 + D.Image * 10 + 4); DieSound = (SoundList)(200 + D.Image * 10 + 5); if (Dead) { DoAction(MirAction.Dead); } else { PlayAppearSound(); DoAction(MirAction.Standing); Frame = Main.Rand.Next(CurrentFrame.Count); } }
private void FillDetailsList(string monsterName) { int monsterIndex = 0; List <MonsterDetails> fullList = new List <MonsterDetails>(); while (monsterIndex != -1) { string header = ""; string subheader = ""; string content = ""; ((App)Application.Current).CheckMonsterAbilitiesList(monsterName, ref header, ref subheader, ref content, ref monsterIndex); if (monsterIndex == -1) { break; } if (content != "" && header == "" && subheader == "") { subheader = "INFO:"; } MonsterDetails monsterDetails = new MonsterDetails(); monsterDetails.HeaderText = header; monsterDetails.SubHeaderText = subheader; monsterDetails.ContentText = content; if (header == "") { monsterDetails.HeaderVisibility = Visibility.Collapsed; } if (subheader == "") { monsterDetails.SubHeaderVisibility = Visibility.Collapsed; } if (content == "") { monsterDetails.ContentVisibility = Visibility.Collapsed; } if (header == "CHALLENGE") { monsterCardFlyout.EXPStat = content; } if (content.Length > 80) { monsterDetails.HasHiddenContent(); } if (subheader == "" && content == "" && header != "") { monsterDetails.SetHeaderAsLabel(); } monsterDetails.LeftAlignDetailContent(); fullList.Add(monsterDetails); monsterIndex++; } monsterCardFlyout.AddMonsterDetailsToList(fullList); }