private static void SetDiceFromCreature(InGameCreature inGameCreature, DiceDto npcMonsterDice) { npcMonsterDice.CreatureId = InGameCreature.GetUniversalIndex(inGameCreature.Index); npcMonsterDice.Label = inGameCreature.Name; npcMonsterDice.PlayerName = inGameCreature.Name; npcMonsterDice.BackColor = inGameCreature.BackgroundHex; npcMonsterDice.FontColor = inGameCreature.ForegroundHex; }
public static void AddD20sForSelected(List <DiceDto> diceDtos, DiceRollType rollType) { foreach (InGameCreature inGameCreature in Creatures) { if (inGameCreature.OnScreen) { DiceDto npcMonsterDice = new DiceDto(); npcMonsterDice.Sides = 20; npcMonsterDice.CreatureId = InGameCreature.GetUniversalIndex(inGameCreature.Index); npcMonsterDice.Quantity = 1; SetDiceFromCreature(inGameCreature, npcMonsterDice); npcMonsterDice.Label = null; // Backwards compatibility. May be able to change after reworking code in DieRoller.ts if (rollType == DiceRollType.Initiative) { // TODO: Get initiative vantage for NPC/Monster } diceDtos.Add(npcMonsterDice); } } }
public static void AddD20sForSelected(List <DiceDto> diceDtos, DiceRollType rollType) { foreach (InGameCreature inGameCreature in AllInGameCreatures.Creatures) { if (inGameCreature.OnScreen) { DiceDto npcMonsterDice = new DiceDto(); npcMonsterDice.Sides = 20; npcMonsterDice.CreatureId = InGameCreature.GetUniversalIndex(inGameCreature.Index); npcMonsterDice.Quantity = 1; //npcMonsterDice.Label = inGameCreature.Name; npcMonsterDice.PlayerName = inGameCreature.Name; npcMonsterDice.BackColor = inGameCreature.BackgroundHex; npcMonsterDice.FontColor = inGameCreature.ForegroundHex; if (rollType == DiceRollType.Initiative) { // TODO: Get initiative vantage for NPC/Monster } diceDtos.Add(npcMonsterDice); } } }