mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-12-15 14:49:42 +00:00
Id normalisé
This commit is contained in:
parent
0f19bc9195
commit
9c629b4fcc
2 changed files with 5 additions and 3 deletions
|
|
@ -52,7 +52,8 @@ namespace AideDeJeu.Tools
|
|||
//yield return spell;
|
||||
}
|
||||
spell = new Spell();
|
||||
spell.Id = spell.IdVF = spell.IdVO = spell.Name = spell.NamePHB = headingBlock.Inline.ToContainerString();
|
||||
spell.Name = spell.NamePHB = headingBlock.Inline.ToContainerString();
|
||||
spell.Id = spell.IdVF = spell.IdVO = Tools.Helpers.IdFromName(spell.Name);
|
||||
//Console.WriteLine(spell.Name);
|
||||
}
|
||||
}
|
||||
|
|
@ -192,6 +193,7 @@ namespace AideDeJeu.Tools
|
|||
}
|
||||
monster = new Monster();
|
||||
monster.Name = monster.NamePHB = headingBlock.Inline.ToContainerString();
|
||||
monster.Id = monster.IdVF = monster.IdVO = Tools.Helpers.IdFromName(monster.Name);
|
||||
//Console.WriteLine(spell.Name);
|
||||
}
|
||||
if (headingBlock.HeaderChar == '#' && headingBlock.Level == 2)
|
||||
|
|
|
|||
|
|
@ -168,13 +168,13 @@ namespace AideDeJeu.ViewModels
|
|||
if (file == "spells_hd")
|
||||
{
|
||||
var spells = await GetItemsViewModel(ItemSourceType.SpellHD).GetAllItemsAsync();
|
||||
var spell = spells.Where(i => Tools.Helpers.IdFromName(i.Id) == anchor).FirstOrDefault();
|
||||
var spell = spells.Where(i => i.Id == anchor).FirstOrDefault();
|
||||
await Navigator.GotoSpellDetailPageAsync(spell);
|
||||
}
|
||||
else if (file == "monsters_hd")
|
||||
{
|
||||
var monsters = await GetItemsViewModel(ItemSourceType.MonsterHD).GetAllItemsAsync();
|
||||
var monster = monsters.Where(i => Tools.Helpers.IdFromName(i.Id) == anchor).FirstOrDefault();
|
||||
var monster = monsters.Where(i => i.Id == anchor).FirstOrDefault();
|
||||
await Navigator.GotoMonsterDetailPageAsync(monster);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue