private void ReadMonsterStats(Stream saveData) { var equipmentReader = new MonsterStatsReader(saveData); foreach (MonsterStatsSaveSlotInfo monsterStatsInfo in equipmentReader.Read()) { PrintBaseSaveData(monsterStatsInfo); Console.WriteLine(); foreach (MonsterStatsInfo monsterStats in monsterStatsInfo.MonsterStats) { //Console.WriteLine($"{monsterStats.Name,-20}{monsterStats.Captured,-5}{monsterStats.Slayed,-10}{monsterStats.Smallest,-5}{monsterStats.Largest,-10}{monsterStats.ResearchLevel}"); //if (monsterStats.HasCrowns && (monsterStats.HasMiniCrown == false || monsterStats.HasGoldCrown == false)) Console.WriteLine($"{monsterStats.Name,-20}{monsterStats.Slayed + monsterStats.Captured,-5}{monsterStats.Captured,-10}{MiniCrown(monsterStats),-3}{LargeCrown(monsterStats),-10}{monsterStats.ResearchLevel}"); } PrintSeparator('-'); } string MiniCrown(MonsterStatsInfo monsterStats) { if (monsterStats.HasCrowns == false) { return(" "); } if (monsterStats.HasMiniCrown) { return("_"); } return("x"); } string LargeCrown(MonsterStatsInfo monsterStats) { if (monsterStats.HasCrowns == false) { return(" "); } if (monsterStats.HasGoldCrown) { return("_"); } return("x"); } }
private void ReadMonsterStats(Stream saveData) { var equipmentReader = new MonsterStatsReader(saveData); foreach (MonsterStatsSaveSlotInfo monsterStatsInfo in equipmentReader.Read()) { PrintBaseSaveData(monsterStatsInfo); Console.WriteLine(); int index = 0; foreach (MonsterStatsInfo monsterStats in monsterStatsInfo.MonsterStats) { Console.Write($"{index:d2} - {monsterStats.Name,-22}{monsterStats.Slayed + monsterStats.Captured,-5}{monsterStats.Captured,-10}"); if (monsterStats.HasCrowns) { if (monsterStats.HasMiniCrown) { Console.ForegroundColor = ConsoleColor.DarkYellow; } else { Console.ForegroundColor = ConsoleColor.Red; } } Console.Write($"{MiniCrown(monsterStats),-3}"); if (monsterStats.HasCrowns) { if (monsterStats.HasGoldCrown) { Console.ForegroundColor = ConsoleColor.DarkYellow; } else if (monsterStats.HasSilverCrown) { Console.ForegroundColor = ConsoleColor.White; } else { Console.ForegroundColor = ConsoleColor.Red; } } Console.Write($"{LargeCrown(monsterStats),-10}"); Console.ResetColor(); Console.WriteLine($"{monsterStats.ResearchLevel}"); index++; } PrintSeparator('-'); } string MiniCrown(MonsterStatsInfo monsterStats) { if (monsterStats.HasCrowns == false) { return(" "); } if (monsterStats.HasMiniCrown) { return("G"); } return("X"); } string LargeCrown(MonsterStatsInfo monsterStats) { if (monsterStats.HasCrowns == false) { return(" "); } if (monsterStats.HasGoldCrown) { return("G"); } else if (monsterStats.HasSilverCrown) { return("S"); } return("X"); } }