master #3

Open
cacahuetes wants to merge 653 commits from liza/Questionable:master into cacahuetes-ShB-Healer
2 changed files with 45 additions and 36 deletions
Showing only changes of commit c23ba27103 - Show all commits

View File

@ -70,7 +70,7 @@ internal sealed class CreationUtilsComponent
_logger = logger; _logger = logger;
} }
public unsafe void Draw() public void Draw()
{ {
Debug.Assert(_clientState.LocalPlayer != null, "_clientState.LocalPlayer != null"); Debug.Assert(_clientState.LocalPlayer != null, "_clientState.LocalPlayer != null");
@ -90,58 +90,64 @@ internal sealed class CreationUtilsComponent
} }
#if false #if false
var questManager = QuestManager.Instance(); unsafe {
if (questManager != null) var questManager = QuestManager.Instance();
{ if (questManager != null)
for (int i = questManager->TrackedQuests.Length - 1; i >= 0; --i)
{ {
var trackedQuest = questManager->TrackedQuests[i]; for (int i = questManager->TrackedQuests.Length - 1; i >= 0; --i)
switch (trackedQuest.QuestType)
{ {
default: var trackedQuest = questManager->TrackedQuests[i];
ImGui.Text($"Tracked quest {i}: {trackedQuest.QuestType}, {trackedQuest.Index}"); switch (trackedQuest.QuestType)
break; {
default:
ImGui.Text($"Tracked quest {i}: {trackedQuest.QuestType}, {trackedQuest.Index}");
break;
case 1: case 1:
//_questRegistry.TryGetQuest(questManager->NormalQuests[trackedQuest.Index].QuestId, //_questRegistry.TryGetQuest(questManager->NormalQuests[trackedQuest.Index].QuestId,
// out var quest); // out var quest);
ImGui.Text( ImGui.Text(
$"Quest: {questManager->NormalQuests[trackedQuest.Index].QuestId}, {trackedQuest.Index}"); $"Quest: {questManager->NormalQuests[trackedQuest.Index].QuestId}, {trackedQuest.Index}");
break; break;
case 2: case 2:
ImGui.Text($"Leve: {questManager->LeveQuests[trackedQuest.Index].LeveId}, {trackedQuest.Index}"); ImGui.Text($"Leve: {questManager->LeveQuests[trackedQuest.Index].LeveId}, {trackedQuest.Index}");
break; break;
}
} }
} }
} }
#endif #endif
#if false #if false
var questManager = QuestManager.Instance(); unsafe {
if (questManager != null) var questManager = QuestManager.Instance();
{ if (questManager != null)
for (int i = 0; i < questManager->DailyQuests.Length; ++i)
{ {
var dailyQuest = questManager->DailyQuests[i]; for (int i = 0; i < questManager->DailyQuests.Length; ++i)
ImGui.Text($"Daily Quest {i}: {dailyQuest.QuestId}, {dailyQuest.IsCompleted}"); {
var dailyQuest = questManager->DailyQuests[i];
ImGui.Text($"Daily Quest {i}: {dailyQuest.QuestId}, {dailyQuest.IsCompleted}");
}
} }
} }
#endif #endif
#if false #if false
var director = UIState.Instance()->DirectorTodo.Director; unsafe {
if (director != null) var director = UIState.Instance()->DirectorTodo.Director;
{ if (director != null)
ImGui.Text($"Director: {director->ContentId}");
ImGui.Text($"Seq: {director->Sequence}");
ImGui.Text($"Ico: {director->IconId}");
if (director->EventHandlerInfo != null)
{ {
ImGui.Text($" EHI CI: {director->EventHandlerInfo->EventId.ContentId}"); ImGui.Text($"Director: {director->ContentId}");
ImGui.Text($" EHI EI: {director->EventHandlerInfo->EventId.Id}"); ImGui.Text($"Seq: {director->Sequence}");
ImGui.Text($" EHI EEI: {director->EventHandlerInfo->EventId.EntryId}"); ImGui.Text($"Ico: {director->IconId}");
ImGui.Text($" EHI F: {director->EventHandlerInfo->Flags}"); if (director->EventHandlerInfo != null)
{
ImGui.Text($" EHI CI: {director->EventHandlerInfo->EventId.ContentId}");
ImGui.Text($" EHI EI: {director->EventHandlerInfo->EventId.Id}");
ImGui.Text($" EHI EEI: {director->EventHandlerInfo->EventId.EntryId}");
ImGui.Text($" EHI F: {director->EventHandlerInfo->Flags}");
}
} }
} }
#endif #endif

View File

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Globalization; using System.Globalization;
using System.Linq; using System.Linq;
using Dalamud.Interface; using Dalamud.Interface;
@ -18,6 +19,7 @@ namespace Questionable.Windows.QuestComponents;
internal sealed class EventInfoComponent internal sealed class EventInfoComponent
{ {
[SuppressMessage("ReSharper", "CollectionNeverUpdated.Local")]
private readonly List<EventQuest> _eventQuests = private readonly List<EventQuest> _eventQuests =
[ [
]; ];
@ -45,6 +47,7 @@ internal sealed class EventInfoComponent
_pluginInterface = pluginInterface; _pluginInterface = pluginInterface;
} }
[SuppressMessage("ReSharper", "UnusedMember.Local")]
private static DateTime AtDailyReset(DateOnly date) private static DateTime AtDailyReset(DateOnly date)
{ {
return new DateTime(date, new TimeOnly(14, 59), DateTimeKind.Utc); return new DateTime(date, new TimeOnly(14, 59), DateTimeKind.Utc);