muffin v7.4.1
This commit is contained in:
parent
a4175abacd
commit
7ae14cf8b8
24 changed files with 2673 additions and 722 deletions
|
|
@ -10,6 +10,10 @@ public readonly struct ExtendedBaseParam : IExcelRow<ExtendedBaseParam>
|
|||
|
||||
public uint RowId => _003Crow_003EP;
|
||||
|
||||
public ExcelPage ExcelPage => _003Cpage_003EP;
|
||||
|
||||
public uint RowOffset => _003Coffset_003EP;
|
||||
|
||||
public BaseParam BaseParam => new BaseParam(_003Cpage_003EP, _003Coffset_003EP, _003Crow_003EP);
|
||||
|
||||
public unsafe Collection<ushort> EquipSlotCategoryPct => new Collection<ushort>(_003Cpage_003EP, _003Coffset_003EP, _003Coffset_003EP, (delegate*<ExcelPage, uint, uint, uint, ushort>)(&EquipSlotCategoryPctCtor), 23);
|
||||
|
|
|
|||
|
|
@ -14,22 +14,22 @@
|
|||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<Reference Include="Dalamud">
|
||||
<HintPath>..\..\..\..\..\ffxiv\alyssile-xivl\addon\Hooks\dev\Dalamud.dll</HintPath>
|
||||
<HintPath>C:\Users\Aly\AppData\Roaming\XIVLauncher\addon\Hooks\dev\Dalamud.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Lumina">
|
||||
<HintPath>..\..\..\..\..\ffxiv\alyssile-xivl\addon\Hooks\dev\Lumina.dll</HintPath>
|
||||
<HintPath>C:\Users\Aly\AppData\Roaming\XIVLauncher\addon\Hooks\dev\Lumina.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FFXIVClientStructs">
|
||||
<HintPath>..\..\..\..\..\ffxiv\alyssile-xivl\addon\Hooks\dev\FFXIVClientStructs.dll</HintPath>
|
||||
<HintPath>C:\Users\Aly\AppData\Roaming\XIVLauncher\addon\Hooks\dev\FFXIVClientStructs.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Dalamud.Bindings.ImGui">
|
||||
<HintPath>..\..\..\..\..\ffxiv\alyssile-xivl\addon\Hooks\dev\Dalamud.Bindings.ImGui.dll</HintPath>
|
||||
<HintPath>C:\Users\Aly\AppData\Roaming\XIVLauncher\addon\Hooks\dev\Dalamud.Bindings.ImGui.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Lumina.Excel">
|
||||
<HintPath>..\..\..\..\..\ffxiv\alyssile-xivl\addon\Hooks\dev\Lumina.Excel.dll</HintPath>
|
||||
<HintPath>C:\Users\Aly\AppData\Roaming\XIVLauncher\addon\Hooks\dev\Lumina.Excel.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="InteropGenerator.Runtime">
|
||||
<HintPath>..\..\..\..\..\ffxiv\alyssile-xivl\addon\Hooks\dev\InteropGenerator.Runtime.dll</HintPath>
|
||||
<HintPath>C:\Users\Aly\AppData\Roaming\XIVLauncher\addon\Hooks\dev\InteropGenerator.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -8,6 +8,10 @@ public readonly struct QuestDialogueText : IQuestDialogueText, IExcelRow<QuestDi
|
|||
{
|
||||
public uint RowId => _003Crow_003EP;
|
||||
|
||||
public ExcelPage ExcelPage => _003Cpage_003EP;
|
||||
|
||||
public uint RowOffset => _003Coffset_003EP;
|
||||
|
||||
public ReadOnlySeString Key => _003Cpage_003EP.ReadString(_003Coffset_003EP, _003Coffset_003EP);
|
||||
|
||||
public ReadOnlySeString Value => _003Cpage_003EP.ReadString(_003Coffset_003EP + 4, _003Coffset_003EP);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -6,7 +6,6 @@ using System.Runtime.InteropServices;
|
|||
using System.Text.RegularExpressions;
|
||||
using Dalamud.Game.Addon.Lifecycle;
|
||||
using Dalamud.Game.Addon.Lifecycle.AddonArgTypes;
|
||||
using Dalamud.Game.ClientState.Objects;
|
||||
using Dalamud.Game.ClientState.Objects.Types;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.Event;
|
||||
|
|
|
|||
|
|
@ -94,18 +94,22 @@ internal static class Dive
|
|||
|
||||
private unsafe void Descend()
|
||||
{
|
||||
UIInputData.Keybind keybind = default(UIInputData.Keybind);
|
||||
byte* ptr = stackalloc byte[16];
|
||||
Utf8String* name = Utf8String.FromString("MOVE_DESCENT");
|
||||
UIInputData.Instance()->GetKeybindByName(name, (Keybind*)(&keybind));
|
||||
logger.LogInformation("Dive keybind: {Key1} + {Modifier1}, {Key2} + {Modifier2}", keybind.Key, keybind.Modifier, keybind.AltKey, keybind.AltModifier);
|
||||
UIInputData.Instance()->GetKeybindByName(name, (Keybind*)ptr);
|
||||
SeVirtualKey seVirtualKey = (SeVirtualKey)(*(uint*)ptr);
|
||||
byte b = ptr[4];
|
||||
SeVirtualKey seVirtualKey2 = (SeVirtualKey)((uint*)ptr)[2];
|
||||
byte b2 = ptr[12];
|
||||
logger.LogInformation("Dive keybind: {Key1} + {Modifier1}, {Key2} + {Modifier2}", seVirtualKey, b, seVirtualKey2, b2);
|
||||
int num = 2;
|
||||
List<List<nint>> list = new List<List<nint>>(num);
|
||||
CollectionsMarshal.SetCount(list, num);
|
||||
Span<List<nint>> span = CollectionsMarshal.AsSpan(list);
|
||||
int num2 = 0;
|
||||
span[num2] = GetKeysToPress(keybind.Key, keybind.Modifier);
|
||||
span[num2] = GetKeysToPress(seVirtualKey, b);
|
||||
num2++;
|
||||
span[num2] = GetKeysToPress(keybind.AltKey, keybind.AltModifier);
|
||||
span[num2] = GetKeysToPress(seVirtualKey2, b2);
|
||||
List<nint> list2 = (from x in list
|
||||
where x != null
|
||||
select (x)).MinBy((List<nint> x) => x.Count);
|
||||
|
|
@ -142,18 +146,18 @@ internal static class Dive
|
|||
public static extern nint SendMessage(nint hWnd, uint Msg, nint wParam, nint lParam);
|
||||
}
|
||||
|
||||
private static List<nint>? GetKeysToPress(SeVirtualKey key, ModifierFlag modifier)
|
||||
private static List<nint>? GetKeysToPress(SeVirtualKey key, byte modifier)
|
||||
{
|
||||
List<nint> list = new List<nint>();
|
||||
if (modifier.HasFlag(ModifierFlag.Ctrl))
|
||||
if ((modifier & 1) != 0)
|
||||
{
|
||||
list.Add(17);
|
||||
}
|
||||
if (modifier.HasFlag(ModifierFlag.Shift))
|
||||
if ((modifier & 2) != 0)
|
||||
{
|
||||
list.Add(16);
|
||||
}
|
||||
if (modifier.HasFlag(ModifierFlag.Alt))
|
||||
if ((modifier & 4) != 0)
|
||||
{
|
||||
list.Add(18);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Dalamud.Game.ClientState.Conditions;
|
||||
using Dalamud.Game.ClientState.Objects;
|
||||
using Dalamud.Game.ClientState.Objects.Types;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ using System.Linq;
|
|||
using System.Numerics;
|
||||
using System.Runtime.InteropServices;
|
||||
using Dalamud.Game.ClientState.Conditions;
|
||||
using Dalamud.Game.ClientState.Objects;
|
||||
using Dalamud.Game.ClientState.Objects.Enums;
|
||||
using Dalamud.Game.ClientState.Objects.Types;
|
||||
using Dalamud.Plugin.Services;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using Dalamud.Game.ClientState.Objects;
|
||||
using Dalamud.Game.Command;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Questionable.Functions;
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ using Dalamud.Game.ClientState.Objects.SubKinds;
|
|||
using Dalamud.Game.ClientState.Objects.Types;
|
||||
using Dalamud.Plugin.Ipc.Exceptions;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.Enums;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game;
|
||||
using FFXIVClientStructs.FFXIV.Client.Game.Control;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
|
@ -689,14 +690,14 @@ internal sealed class MovementController : IDisposable
|
|||
bool flag2;
|
||||
switch (GameMain.Instance()->CurrentTerritoryIntendedUseId)
|
||||
{
|
||||
case 0:
|
||||
case 7:
|
||||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
case 19:
|
||||
case 23:
|
||||
case 29:
|
||||
case TerritoryIntendedUse.Town:
|
||||
case TerritoryIntendedUse.BeforeTrialDung:
|
||||
case TerritoryIntendedUse.HousingOutdoor:
|
||||
case TerritoryIntendedUse.HousingIndoor:
|
||||
case TerritoryIntendedUse.SoloOverworldInstances:
|
||||
case TerritoryIntendedUse.ChocoboSquareOld:
|
||||
case TerritoryIntendedUse.GoldSaucer:
|
||||
case TerritoryIntendedUse.SoloDuty:
|
||||
flag2 = true;
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -99,6 +99,8 @@ internal sealed class QuestController : MiniTaskController<QuestController>
|
|||
|
||||
private readonly QuestRegistry _questRegistry;
|
||||
|
||||
private readonly JournalData _journalData;
|
||||
|
||||
private readonly IKeyState _keyState;
|
||||
|
||||
private readonly IChatGui _chatGui;
|
||||
|
|
@ -234,7 +236,7 @@ internal sealed class QuestController : MiniTaskController<QuestController>
|
|||
|
||||
public event AutomationTypeChangedEventHandler? AutomationTypeChanged;
|
||||
|
||||
public QuestController(IClientState clientState, IObjectTable objectTable, GameFunctions gameFunctions, QuestFunctions questFunctions, MovementController movementController, CombatController combatController, GatheringController gatheringController, ILogger<QuestController> logger, QuestRegistry questRegistry, IKeyState keyState, IChatGui chatGui, ICondition condition, IToastGui toastGui, Configuration configuration, TaskCreator taskCreator, IServiceProvider serviceProvider, InterruptHandler interruptHandler, IDataManager dataManager, SinglePlayerDutyConfigComponent singlePlayerDutyConfigComponent)
|
||||
public QuestController(IClientState clientState, IObjectTable objectTable, GameFunctions gameFunctions, QuestFunctions questFunctions, MovementController movementController, CombatController combatController, GatheringController gatheringController, ILogger<QuestController> logger, QuestRegistry questRegistry, JournalData journalData, IKeyState keyState, IChatGui chatGui, ICondition condition, IToastGui toastGui, Configuration configuration, TaskCreator taskCreator, IServiceProvider serviceProvider, InterruptHandler interruptHandler, IDataManager dataManager, SinglePlayerDutyConfigComponent singlePlayerDutyConfigComponent)
|
||||
: base(chatGui, condition, serviceProvider, interruptHandler, dataManager, logger)
|
||||
{
|
||||
_clientState = clientState;
|
||||
|
|
@ -245,6 +247,7 @@ internal sealed class QuestController : MiniTaskController<QuestController>
|
|||
_combatController = combatController;
|
||||
_gatheringController = gatheringController;
|
||||
_questRegistry = questRegistry;
|
||||
_journalData = journalData;
|
||||
_keyState = keyState;
|
||||
_chatGui = chatGui;
|
||||
_condition = condition;
|
||||
|
|
@ -1231,7 +1234,7 @@ internal sealed class QuestController : MiniTaskController<QuestController>
|
|||
_logger.LogDebug("Excluding allied society quest {QuestId} from bulk add", quest.Id);
|
||||
return false;
|
||||
}
|
||||
if (quest.Info is QuestInfo { MoogleDeliveryLevel: >0 })
|
||||
if (quest.Info is QuestInfo questInfo && _journalData.MoogleDeliveryGenreId.HasValue && questInfo.JournalGenre == _journalData.MoogleDeliveryGenreId.Value)
|
||||
{
|
||||
_logger.LogDebug("Excluding moogle delivery quest {QuestId} from bulk add", quest.Id);
|
||||
return false;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@ using System.Collections.ObjectModel;
|
|||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using Dalamud.Game;
|
||||
using Dalamud.Game.ClientState.Objects;
|
||||
using Dalamud.Game.ClientState.Objects.Types;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.System.Framework;
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ internal sealed class ExcelFunctions
|
|||
switch (excelSheet)
|
||||
{
|
||||
case "GimmickYesNo":
|
||||
return _dataManager.GetExcelSheet<GimmickYesNo>().GetRowOrDefault(rowId)?.Unknown0;
|
||||
return _dataManager.GetExcelSheet<GimmickYesNo>().GetRowOrDefault(rowId)?.Message;
|
||||
case "Warp":
|
||||
return _dataManager.GetExcelSheet<Warp>().GetRowOrDefault(rowId)?.Name;
|
||||
case "Addon":
|
||||
|
|
|
|||
|
|
@ -4,9 +4,7 @@ using System.Collections.ObjectModel;
|
|||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using System.Runtime.InteropServices;
|
||||
using Dalamud.Game;
|
||||
using Dalamud.Game.ClientState.Conditions;
|
||||
using Dalamud.Game.ClientState.Objects;
|
||||
using Dalamud.Game.ClientState.Objects.Enums;
|
||||
using Dalamud.Game.ClientState.Objects.SubKinds;
|
||||
using Dalamud.Game.ClientState.Objects.Types;
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ internal sealed class QuestFunctions
|
|||
|
||||
private readonly QuestData _questData;
|
||||
|
||||
private readonly JournalData _journalData;
|
||||
|
||||
private readonly AetheryteFunctions _aetheryteFunctions;
|
||||
|
||||
private readonly AlliedSocietyQuestFunctions _alliedSocietyQuestFunctions;
|
||||
|
|
@ -70,10 +72,11 @@ internal sealed class QuestFunctions
|
|||
|
||||
private ElementId? _lastLoggedAcceptedHiddenMsq;
|
||||
|
||||
public QuestFunctions(QuestRegistry questRegistry, QuestData questData, AetheryteFunctions aetheryteFunctions, AlliedSocietyQuestFunctions alliedSocietyQuestFunctions, AlliedSocietyData alliedSocietyData, AetheryteData aetheryteData, Configuration configuration, IDataManager dataManager, IObjectTable objectTable, IClientState clientState, IGameGui gameGui, IAetheryteList aetheryteList, ILogger<QuestFunctions> logger)
|
||||
public QuestFunctions(QuestRegistry questRegistry, QuestData questData, JournalData journalData, AetheryteFunctions aetheryteFunctions, AlliedSocietyQuestFunctions alliedSocietyQuestFunctions, AlliedSocietyData alliedSocietyData, AetheryteData aetheryteData, Configuration configuration, IDataManager dataManager, IObjectTable objectTable, IClientState clientState, IGameGui gameGui, IAetheryteList aetheryteList, ILogger<QuestFunctions> logger)
|
||||
{
|
||||
_questRegistry = questRegistry;
|
||||
_questData = questData;
|
||||
_journalData = journalData;
|
||||
_aetheryteFunctions = aetheryteFunctions;
|
||||
_alliedSocietyQuestFunctions = alliedSocietyQuestFunctions;
|
||||
_alliedSocietyData = alliedSocietyData;
|
||||
|
|
@ -870,7 +873,7 @@ internal sealed class QuestFunctions
|
|||
{
|
||||
if (IsQuestUnobtainable(questId, extraCompletedQuest))
|
||||
{
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
QuestInfo questInfo = (QuestInfo)_questData.GetQuestInfo(questId);
|
||||
if (questInfo.GrandCompany != FFXIVClientStructs.FFXIV.Client.UI.Agent.GrandCompany.None)
|
||||
|
|
@ -891,10 +894,10 @@ internal sealed class QuestFunctions
|
|||
{
|
||||
return !IsDailyAlliedSocietyQuestAndAvailableToday(questId);
|
||||
}
|
||||
if (questInfo.IsMoogleDeliveryQuest)
|
||||
if (_journalData.MoogleDeliveryGenreId.HasValue && questInfo.JournalGenre == _journalData.MoogleDeliveryGenreId.Value)
|
||||
{
|
||||
byte b = PlayerState.Instance()->DeliveryLevel;
|
||||
if (extraCompletedQuest != null && _questData.TryGetQuestInfo(extraCompletedQuest, out IQuestInfo questInfo2) && questInfo2 is QuestInfo { IsMoogleDeliveryQuest: not false })
|
||||
if (extraCompletedQuest != null && _questData.TryGetQuestInfo(extraCompletedQuest, out IQuestInfo questInfo2) && questInfo2 is QuestInfo questInfo3 && _journalData.MoogleDeliveryGenreId.HasValue && questInfo3.JournalGenre == _journalData.MoogleDeliveryGenreId.Value)
|
||||
{
|
||||
b++;
|
||||
}
|
||||
|
|
@ -1033,25 +1036,25 @@ internal sealed class QuestFunctions
|
|||
{
|
||||
return true;
|
||||
}
|
||||
if (questInfo2.JournalGenre >= 234 && questInfo2.JournalGenre <= 247)
|
||||
if (questInfo2.JournalGenre.HasValue && _journalData.SeasonalEventGenreIds.Contains(questInfo2.JournalGenre.Value))
|
||||
{
|
||||
if (_questRegistry.TryGetQuest(questId, out Questionable.Model.Quest quest))
|
||||
{
|
||||
List<QuestSequence> list = quest?.Root?.QuestSequence;
|
||||
if (list != null && list.Count > 0)
|
||||
{
|
||||
goto IL_0288;
|
||||
goto IL_027a;
|
||||
}
|
||||
}
|
||||
if (_alreadyLoggedUnobtainableQuestsDetailed.Add(questId.Value))
|
||||
{
|
||||
_questData.ApplySeasonalOverride(questId, isSeasonal: true, null);
|
||||
_logger.LogDebug("Quest {QuestId} unobtainable: journal genre is 'event (seasonal)' and no quest path", questId);
|
||||
_logger.LogDebug("Quest {QuestId} unobtainable: journal genre {Genre} is 'event (seasonal)' and no quest path", questId, questInfo2.JournalGenre);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
goto IL_0288;
|
||||
IL_0288:
|
||||
goto IL_027a;
|
||||
IL_027a:
|
||||
if (questInfo2.QuestLocks.Count > 0)
|
||||
{
|
||||
int num = questInfo2.QuestLocks.Count((QuestId x) => IsQuestComplete(x) || x.Equals(extraCompletedQuest));
|
||||
|
|
|
|||
|
|
@ -18,12 +18,12 @@ public abstract record ItemReward(ItemRewardDetails Item)
|
|||
|
||||
internal static ItemReward? CreateFromItem(Item item, ElementId elementId)
|
||||
{
|
||||
ushort? num = item.ItemAction.ValueNullable?.Type;
|
||||
uint? num = item.ItemAction.ValueNullable?.RowId;
|
||||
if (num.HasValue && num == 1322)
|
||||
{
|
||||
return new MountReward(new ItemRewardDetails(item, elementId), item.ItemAction.Value.Data[0]);
|
||||
}
|
||||
num = item.ItemAction.ValueNullable?.Type;
|
||||
num = item.ItemAction.ValueNullable?.RowId;
|
||||
if (num.HasValue && num == 853)
|
||||
{
|
||||
return new MinionReward(new ItemRewardDetails(item, elementId), item.ItemAction.Value.Data[0]);
|
||||
|
|
@ -40,7 +40,7 @@ public abstract record ItemReward(ItemRewardDetails Item)
|
|||
TripleTriadCard valueOrDefault4 = valueOrDefault3.GetValueOrDefault();
|
||||
return new TripleTriadCardReward(new ItemRewardDetails(item, elementId), (ushort)valueOrDefault4.RowId);
|
||||
}
|
||||
num = item.ItemAction.ValueNullable?.Type;
|
||||
num = item.ItemAction.ValueNullable?.RowId;
|
||||
if (num.HasValue && num == 20086)
|
||||
{
|
||||
return new FashionAccessoryReward(new ItemRewardDetails(item, elementId), item.ItemAction.Value.Data[0]);
|
||||
|
|
|
|||
|
|
@ -60,8 +60,6 @@ internal sealed class QuestInfo : IQuestInfo
|
|||
|
||||
public byte MoogleDeliveryLevel { get; }
|
||||
|
||||
public bool IsMoogleDeliveryQuest => JournalGenre == 87;
|
||||
|
||||
public IReadOnlyList<ItemReward> ItemRewards { get; }
|
||||
|
||||
public EExpansionVersion Expansion { get; }
|
||||
|
|
|
|||
|
|
@ -96,8 +96,6 @@ internal sealed class QuestJournalComponent
|
|||
|
||||
private readonly ILogger<QuestJournalComponent> _logger;
|
||||
|
||||
private const uint SeasonalJournalCategoryRowId = 96u;
|
||||
|
||||
private List<FilteredSection> _filteredSections = new List<FilteredSection>();
|
||||
|
||||
private bool _lastHideSeasonalGlobally;
|
||||
|
|
@ -458,14 +456,14 @@ internal sealed class QuestJournalComponent
|
|||
private FilteredSection FilterSection(JournalData.Section section, FilterConfiguration filter)
|
||||
{
|
||||
IEnumerable<JournalData.Category> enumerable;
|
||||
if (!_configuration.General.HideSeasonalEventsFromJournalProgress)
|
||||
if (!_configuration.General.HideSeasonalEventsFromJournalProgress || !_journalData.SeasonalEventsCategoryId.HasValue)
|
||||
{
|
||||
IEnumerable<JournalData.Category> categories = section.Categories;
|
||||
enumerable = categories;
|
||||
}
|
||||
else
|
||||
{
|
||||
enumerable = section.Categories.Where((JournalData.Category c) => c.Id != 96);
|
||||
enumerable = section.Categories.Where((JournalData.Category c) => c.Id != _journalData.SeasonalEventsCategoryId.Value);
|
||||
}
|
||||
IEnumerable<JournalData.Category> source = enumerable;
|
||||
return new FilteredSection(Categories: ((!IsCategorySectionGenreMatch(filter, section.Name)) ? source.Select((JournalData.Category category) => FilterCategory(category, filter, section)) : source.Select((JournalData.Category x) => FilterCategory(x, filter.WithoutName(), section))).Where((FilteredCategory x) => x.Genres.Count > 0).ToList(), Section: section);
|
||||
|
|
@ -481,7 +479,7 @@ internal sealed class QuestJournalComponent
|
|||
{
|
||||
bool hideSeasonalEventsFromJournalProgress = _configuration.General.HideSeasonalEventsFromJournalProgress;
|
||||
IEnumerable<IQuestInfo> source = ((!IsCategorySectionGenreMatch(filter, genre.Name)) ? genre.Quests.Where((IQuestInfo x) => IsQuestMatch(filter, x)) : genre.Quests.Where((IQuestInfo x) => IsQuestMatch(filter.WithoutName(), x)));
|
||||
if (hideSeasonalEventsFromJournalProgress && genre.CategoryId == 96)
|
||||
if (hideSeasonalEventsFromJournalProgress && _journalData.SeasonalEventsCategoryId.HasValue && genre.CategoryId == _journalData.SeasonalEventsCategoryId.Value)
|
||||
{
|
||||
source = source.Where((IQuestInfo q) => !IsSeasonal(q));
|
||||
}
|
||||
|
|
@ -497,7 +495,7 @@ internal sealed class QuestJournalComponent
|
|||
_logger.LogInformation("Refreshing journal counts. HideSeasonalEventsFromJournalProgress={Hide}", hideSeasonalEventsFromJournalProgress);
|
||||
foreach (JournalData.Genre genre in _journalData.Genres)
|
||||
{
|
||||
List<IQuestInfo> source = ((hideSeasonalEventsFromJournalProgress && genre.CategoryId == 96) ? genre.Quests.Where((IQuestInfo q) => !IsSeasonal(q)).ToList() : genre.Quests.ToList());
|
||||
List<IQuestInfo> source = ((hideSeasonalEventsFromJournalProgress && _journalData.SeasonalEventsCategoryId.HasValue && genre.CategoryId == _journalData.SeasonalEventsCategoryId.Value) ? genre.Quests.Where((IQuestInfo q) => !IsSeasonal(q)).ToList() : genre.Quests.ToList());
|
||||
Quest quest;
|
||||
int available = source.Count((IQuestInfo x) => _questRegistry.TryGetQuest(x.QuestId, out quest) && !quest.Root.Disabled && !_questFunctions.IsQuestRemoved(x.QuestId));
|
||||
int total = source.Count((IQuestInfo x) => !_questFunctions.IsQuestRemoved(x.QuestId));
|
||||
|
|
@ -507,7 +505,7 @@ internal sealed class QuestJournalComponent
|
|||
}
|
||||
foreach (JournalData.Category category in _journalData.Categories)
|
||||
{
|
||||
if (!hideSeasonalEventsFromJournalProgress || category.Id != 96)
|
||||
if (!hideSeasonalEventsFromJournalProgress || !_journalData.SeasonalEventsCategoryId.HasValue || category.Id != _journalData.SeasonalEventsCategoryId.Value)
|
||||
{
|
||||
List<JournalCounts> source2 = _genre_counts_or_default(category);
|
||||
int available2 = source2.Sum((JournalCounts x) => x.Available);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ using System.Numerics;
|
|||
using System.Runtime.CompilerServices;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Game.ClientState.Conditions;
|
||||
using Dalamud.Game.ClientState.Objects;
|
||||
using Dalamud.Game.ClientState.Objects.Enums;
|
||||
using Dalamud.Game.ClientState.Objects.Types;
|
||||
using Dalamud.Game.Text;
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ internal sealed class EventInfoComponent
|
|||
|
||||
private readonly IDataManager _dataManager;
|
||||
|
||||
private readonly JournalData _journalData;
|
||||
|
||||
private List<IQuestInfo> _cachedActiveSeasonalQuests = new List<IQuestInfo>();
|
||||
|
||||
private DateTime _cachedAtUtc = DateTime.MinValue;
|
||||
|
|
@ -60,7 +62,7 @@ internal sealed class EventInfoComponent
|
|||
}
|
||||
}
|
||||
|
||||
public EventInfoComponent(QuestData questData, QuestRegistry questRegistry, QuestFunctions questFunctions, UiUtils uiUtils, QuestController questController, QuestTooltipComponent questTooltipComponent, Configuration configuration, IDataManager dataManager, ILogger<EventInfoComponent> logger)
|
||||
public EventInfoComponent(QuestData questData, QuestRegistry questRegistry, QuestFunctions questFunctions, UiUtils uiUtils, QuestController questController, QuestTooltipComponent questTooltipComponent, Configuration configuration, IDataManager dataManager, JournalData journalData, ILogger<EventInfoComponent> logger)
|
||||
{
|
||||
_questData = questData;
|
||||
_questRegistry = questRegistry;
|
||||
|
|
@ -70,6 +72,7 @@ internal sealed class EventInfoComponent
|
|||
_questTooltipComponent = questTooltipComponent;
|
||||
_configuration = configuration;
|
||||
_dataManager = dataManager;
|
||||
_journalData = journalData;
|
||||
_logger = logger ?? throw new ArgumentNullException("logger");
|
||||
}
|
||||
|
||||
|
|
@ -254,7 +257,7 @@ internal sealed class EventInfoComponent
|
|||
DateTime? dateTime = null;
|
||||
if (questInfo is QuestInfo questInfo2)
|
||||
{
|
||||
flag = questInfo2.IsSeasonalQuest || questInfo2.IsSeasonalEvent || questInfo2.SeasonalQuestExpiry is DateTime || (questInfo2.JournalGenre >= 234 && questInfo2.JournalGenre <= 247);
|
||||
flag = questInfo2.IsSeasonalQuest || questInfo2.IsSeasonalEvent || questInfo2.SeasonalQuestExpiry is DateTime || (questInfo2.JournalGenre.HasValue && _journalData.SeasonalEventGenreIds.Contains(questInfo2.JournalGenre.Value));
|
||||
dateTime = questInfo2.SeasonalQuestExpiry;
|
||||
}
|
||||
if (flag)
|
||||
|
|
|
|||
|
|
@ -21,25 +21,25 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Dalamud">
|
||||
<HintPath>..\..\..\..\..\ffxiv\alyssile-xivl\addon\Hooks\dev\Dalamud.dll</HintPath>
|
||||
<HintPath>C:\Users\Aly\AppData\Roaming\XIVLauncher\addon\Hooks\dev\Dalamud.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="LLib">
|
||||
<HintPath>..\..\LLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FFXIVClientStructs">
|
||||
<HintPath>..\..\..\..\..\ffxiv\alyssile-xivl\addon\Hooks\dev\FFXIVClientStructs.dll</HintPath>
|
||||
<HintPath>C:\Users\Aly\AppData\Roaming\XIVLauncher\addon\Hooks\dev\FFXIVClientStructs.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Questionable.Model">
|
||||
<HintPath>..\..\Questionable.Model.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>..\..\..\..\..\ffxiv\alyssile-xivl\addon\Hooks\dev\Newtonsoft.Json.dll</HintPath>
|
||||
<HintPath>C:\Users\Aly\AppData\Roaming\XIVLauncher\addon\Hooks\dev\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Logging.Abstractions">
|
||||
<HintPath>..\..\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Serilog">
|
||||
<HintPath>..\..\..\..\..\ffxiv\alyssile-xivl\addon\Hooks\dev\Serilog.dll</HintPath>
|
||||
<HintPath>C:\Users\Aly\AppData\Roaming\XIVLauncher\addon\Hooks\dev\Serilog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.DependencyInjection">
|
||||
<HintPath>..\..\Microsoft.Extensions.DependencyInjection.dll</HintPath>
|
||||
|
|
@ -48,19 +48,19 @@
|
|||
<HintPath>..\..\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Dalamud.Bindings.ImGui">
|
||||
<HintPath>..\..\..\..\..\ffxiv\alyssile-xivl\addon\Hooks\dev\Dalamud.Bindings.ImGui.dll</HintPath>
|
||||
<HintPath>C:\Users\Aly\AppData\Roaming\XIVLauncher\addon\Hooks\dev\Dalamud.Bindings.ImGui.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Lumina.Excel">
|
||||
<HintPath>..\..\..\..\..\ffxiv\alyssile-xivl\addon\Hooks\dev\Lumina.Excel.dll</HintPath>
|
||||
<HintPath>C:\Users\Aly\AppData\Roaming\XIVLauncher\addon\Hooks\dev\Lumina.Excel.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Lumina">
|
||||
<HintPath>..\..\..\..\..\ffxiv\alyssile-xivl\addon\Hooks\dev\Lumina.dll</HintPath>
|
||||
<HintPath>C:\Users\Aly\AppData\Roaming\XIVLauncher\addon\Hooks\dev\Lumina.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="JsonSchema.Net">
|
||||
<HintPath>..\..\JsonSchema.Net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="InteropGenerator.Runtime">
|
||||
<HintPath>..\..\..\..\..\ffxiv\alyssile-xivl\addon\Hooks\dev\InteropGenerator.Runtime.dll</HintPath>
|
||||
<HintPath>C:\Users\Aly\AppData\Roaming\XIVLauncher\addon\Hooks\dev\InteropGenerator.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Logging">
|
||||
<HintPath>..\..\Microsoft.Extensions.Logging.dll</HintPath>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using Dalamud.Game;
|
||||
using Dalamud.Game.ClientState.Objects;
|
||||
using Dalamud.Interface.Windowing;
|
||||
using Dalamud.Plugin;
|
||||
using Dalamud.Plugin.Services;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue