muffin v7.4.1
This commit is contained in:
parent
a4175abacd
commit
7ae14cf8b8
24 changed files with 2673 additions and 722 deletions
|
|
@ -2,6 +2,7 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Lumina.Excel;
|
||||
using Lumina.Excel.Sheets;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Questionable.Model;
|
||||
|
|
@ -85,6 +86,12 @@ internal sealed class JournalData
|
|||
|
||||
private readonly ILogger<JournalData> _logger;
|
||||
|
||||
public uint? SeasonalEventsCategoryId { get; }
|
||||
|
||||
public IReadOnlySet<uint> SeasonalEventGenreIds { get; }
|
||||
|
||||
public uint? MoogleDeliveryGenreId { get; }
|
||||
|
||||
public List<Genre> Genres { get; }
|
||||
|
||||
public List<Category> Categories { get; }
|
||||
|
|
@ -97,7 +104,41 @@ internal sealed class JournalData
|
|||
{
|
||||
JournalData journalData = this;
|
||||
_logger = logger;
|
||||
List<Genre> list = (from x in dataManager.GetExcelSheet<JournalGenre>()
|
||||
ExcelSheet<JournalGenre> excelSheet = dataManager.GetExcelSheet<JournalGenre>();
|
||||
JournalCategory journalCategory = dataManager.GetExcelSheet<JournalCategory>().FirstOrDefault((JournalCategory x) => x.Name.ToString().Equals("Seasonal Events", StringComparison.OrdinalIgnoreCase));
|
||||
if (journalCategory.RowId != 0)
|
||||
{
|
||||
SeasonalEventsCategoryId = journalCategory.RowId;
|
||||
_logger.LogInformation("Resolved 'Seasonal Events' JournalCategory ID: {CategoryId}", SeasonalEventsCategoryId);
|
||||
}
|
||||
else
|
||||
{
|
||||
SeasonalEventsCategoryId = null;
|
||||
_logger.LogWarning("Could not find 'Seasonal Events' JournalCategory - seasonal event detection may not work correctly");
|
||||
}
|
||||
if (SeasonalEventsCategoryId.HasValue)
|
||||
{
|
||||
SeasonalEventGenreIds = (from x in excelSheet
|
||||
where x.RowId != 0 && x.JournalCategory.RowId == journalData.SeasonalEventsCategoryId.Value
|
||||
select x.RowId).ToHashSet();
|
||||
_logger.LogInformation("Resolved {Count} seasonal event JournalGenre IDs from JournalCategory {CategoryId}: [{Ids}]", SeasonalEventGenreIds.Count, SeasonalEventsCategoryId.Value, string.Join(", ", SeasonalEventGenreIds.OrderBy((uint x) => x)));
|
||||
}
|
||||
else
|
||||
{
|
||||
SeasonalEventGenreIds = new HashSet<uint>();
|
||||
}
|
||||
JournalGenre journalGenre = excelSheet.FirstOrDefault((JournalGenre x) => x.Name.ToString().Equals("Delivery Moogle Quests", StringComparison.OrdinalIgnoreCase));
|
||||
if (journalGenre.RowId != 0)
|
||||
{
|
||||
MoogleDeliveryGenreId = journalGenre.RowId;
|
||||
_logger.LogInformation("Resolved 'Delivery Moogle Quests' JournalGenre ID: {GenreId}", MoogleDeliveryGenreId);
|
||||
}
|
||||
else
|
||||
{
|
||||
MoogleDeliveryGenreId = null;
|
||||
_logger.LogWarning("Could not find 'Delivery Moogle Quests' JournalGenre - moogle delivery quest detection may not work correctly");
|
||||
}
|
||||
List<Genre> list = (from x in excelSheet
|
||||
where x.RowId != 0 && x.Icon > 0
|
||||
select new Genre(x, questData.GetAllByJournalGenre(x.RowId))).ToList();
|
||||
QuestRedo row = dataManager.GetExcelSheet<QuestRedo>().GetRow(1u);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue