mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-25 14:11:48 +01:00
Merge branch 'master' into Remove-UiDebug1V2
This commit is contained in:
commit
fb7feb058f
7 changed files with 76 additions and 21 deletions
24
Dalamud.sln
24
Dalamud.sln
|
|
@ -184,18 +184,18 @@ Global
|
|||
{88FB719B-EB41-73C5-8D25-C03E0C69904F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{88FB719B-EB41-73C5-8D25-C03E0C69904F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{88FB719B-EB41-73C5-8D25-C03E0C69904F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{27AA9F87-D2AA-41D9-A559-0F1EBA38C5F8}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||
{27AA9F87-D2AA-41D9-A559-0F1EBA38C5F8}.Debug|Any CPU.Build.0 = Debug|x64
|
||||
{27AA9F87-D2AA-41D9-A559-0F1EBA38C5F8}.Release|Any CPU.ActiveCfg = Release|x64
|
||||
{27AA9F87-D2AA-41D9-A559-0F1EBA38C5F8}.Release|Any CPU.Build.0 = Release|x64
|
||||
{8CDAEB2D-5022-450A-A97F-181C6270185F}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||
{8CDAEB2D-5022-450A-A97F-181C6270185F}.Debug|Any CPU.Build.0 = Debug|x64
|
||||
{8CDAEB2D-5022-450A-A97F-181C6270185F}.Release|Any CPU.ActiveCfg = Release|x64
|
||||
{8CDAEB2D-5022-450A-A97F-181C6270185F}.Release|Any CPU.Build.0 = Release|x64
|
||||
{F5D92D2D-D36F-4471-B657-8B9AA6C98AD6}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||
{F5D92D2D-D36F-4471-B657-8B9AA6C98AD6}.Debug|Any CPU.Build.0 = Debug|x64
|
||||
{F5D92D2D-D36F-4471-B657-8B9AA6C98AD6}.Release|Any CPU.ActiveCfg = Release|x64
|
||||
{F5D92D2D-D36F-4471-B657-8B9AA6C98AD6}.Release|Any CPU.Build.0 = Release|x64
|
||||
{27AA9F87-D2AA-41D9-A559-0F1EBA38C5F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{27AA9F87-D2AA-41D9-A559-0F1EBA38C5F8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{27AA9F87-D2AA-41D9-A559-0F1EBA38C5F8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{27AA9F87-D2AA-41D9-A559-0F1EBA38C5F8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8CDAEB2D-5022-450A-A97F-181C6270185F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8CDAEB2D-5022-450A-A97F-181C6270185F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8CDAEB2D-5022-450A-A97F-181C6270185F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8CDAEB2D-5022-450A-A97F-181C6270185F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F5D92D2D-D36F-4471-B657-8B9AA6C98AD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F5D92D2D-D36F-4471-B657-8B9AA6C98AD6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F5D92D2D-D36F-4471-B657-8B9AA6C98AD6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F5D92D2D-D36F-4471-B657-8B9AA6C98AD6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ public readonly unsafe struct AgentInterfacePtr(nint address) : IEquatable<Agent
|
|||
/// Focuses the AtkUnitBase.
|
||||
/// </summary>
|
||||
/// <returns> <c>true</c> when the addon was focused, <c>false</c> otherwise. </returns>
|
||||
public readonly bool FocusAddon() => this.IsNull && this.Struct->FocusAddon();
|
||||
public readonly bool FocusAddon() => !this.IsNull && this.Struct->FocusAddon();
|
||||
|
||||
/// <summary>Determines whether the specified AgentInterfacePtr is equal to the current AgentInterfacePtr.</summary>
|
||||
/// <param name="other">The AgentInterfacePtr to compare with the current AgentInterfacePtr.</param>
|
||||
|
|
|
|||
|
|
@ -311,9 +311,12 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState
|
|||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool IsMcGuffinUnlocked(McGuffin row)
|
||||
public bool IsLeveCompleted(Leve row)
|
||||
{
|
||||
return PlayerState.Instance()->IsMcGuffinUnlocked(row.RowId);
|
||||
if (!this.IsLoaded)
|
||||
return false;
|
||||
|
||||
return QuestManager.Instance()->IsLevequestComplete((ushort)row.RowId);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
|
@ -328,6 +331,15 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState
|
|||
return this.IsUnlockLinkUnlocked(row.UnlockLink);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool IsMcGuffinUnlocked(McGuffin row)
|
||||
{
|
||||
if (!this.IsLoaded)
|
||||
return false;
|
||||
|
||||
return PlayerState.Instance()->IsMcGuffinUnlocked(row.RowId);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool IsMountUnlocked(Mount row)
|
||||
{
|
||||
|
|
@ -376,9 +388,21 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState
|
|||
return UIState.IsPublicContentUnlocked(row.RowId);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool IsQuestCompleted(Quest row)
|
||||
{
|
||||
if (!this.IsLoaded)
|
||||
return false;
|
||||
|
||||
return QuestManager.IsQuestComplete(row.RowId);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool IsRecipeUnlocked(Recipe row)
|
||||
{
|
||||
if (!this.IsLoaded)
|
||||
return false;
|
||||
|
||||
return this.recipeData.IsRecipeUnlocked(row);
|
||||
}
|
||||
|
||||
|
|
@ -509,6 +533,9 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState
|
|||
if (rowRef.TryGetValue<Item>(out var itemRow))
|
||||
return this.IsItemUnlocked(itemRow);
|
||||
|
||||
if (rowRef.TryGetValue<Leve>(out var leveRow))
|
||||
return this.IsLeveCompleted(leveRow);
|
||||
|
||||
if (rowRef.TryGetValue<MJILandmark>(out var mjiLandmarkRow))
|
||||
return this.IsMJILandmarkUnlocked(mjiLandmarkRow);
|
||||
|
||||
|
|
@ -536,6 +563,9 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState
|
|||
if (rowRef.TryGetValue<PublicContentSheet>(out var publicContentRow))
|
||||
return this.IsPublicContentUnlocked(publicContentRow);
|
||||
|
||||
if (rowRef.TryGetValue<Quest>(out var questRow))
|
||||
return this.IsQuestCompleted(questRow);
|
||||
|
||||
if (rowRef.TryGetValue<Recipe>(out var recipeRow))
|
||||
return this.IsRecipeUnlocked(recipeRow);
|
||||
|
||||
|
|
@ -596,6 +626,8 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState
|
|||
if (!this.IsLoaded)
|
||||
return;
|
||||
|
||||
Log.Verbose("Checking for new unlocks...");
|
||||
|
||||
this.UpdateUnlocksForSheet<ActionSheet>();
|
||||
this.UpdateUnlocksForSheet<AetherCurrent>();
|
||||
this.UpdateUnlocksForSheet<AetherCurrentCompFlgSet>();
|
||||
|
|
@ -629,6 +661,7 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState
|
|||
this.UpdateUnlocksForSheet<Ornament>();
|
||||
this.UpdateUnlocksForSheet<Perform>();
|
||||
this.UpdateUnlocksForSheet<PublicContentSheet>();
|
||||
this.UpdateUnlocksForSheet<Quest>();
|
||||
this.UpdateUnlocksForSheet<Recipe>();
|
||||
this.UpdateUnlocksForSheet<SecretRecipeBook>();
|
||||
this.UpdateUnlocksForSheet<Trait>();
|
||||
|
|
@ -637,6 +670,7 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState
|
|||
// Not implemented:
|
||||
// - DescriptionPage: quite complex
|
||||
// - QuestAcceptAdditionCondition: ignored
|
||||
// - Leve: AgentUpdateFlag.UnlocksUpdate is not set and the completed status can be unset again!
|
||||
|
||||
// For some other day:
|
||||
// - FishingSpot
|
||||
|
|
@ -676,7 +710,7 @@ internal unsafe class UnlockState : IInternalDisposableService, IUnlockState
|
|||
|
||||
unlockedRowIds.Add(row.RowId);
|
||||
|
||||
Log.Verbose($"Unlock detected: {typeof(T).Name}#{row.RowId}");
|
||||
// Log.Verbose($"Unlock detected: {typeof(T).Name}#{row.RowId}");
|
||||
|
||||
foreach (var action in Delegate.EnumerateInvocationList(this.Unlock))
|
||||
{
|
||||
|
|
@ -796,7 +830,7 @@ internal class UnlockStatePluginScoped : IInternalDisposableService, IUnlockStat
|
|||
public bool IsItemUnlocked(Item row) => this.unlockStateService.IsItemUnlocked(row);
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool IsMcGuffinUnlocked(McGuffin row) => this.unlockStateService.IsMcGuffinUnlocked(row);
|
||||
public bool IsLeveCompleted(Leve row) => this.unlockStateService.IsLeveCompleted(row);
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool IsMJILandmarkUnlocked(MJILandmark row) => this.unlockStateService.IsMJILandmarkUnlocked(row);
|
||||
|
|
@ -804,6 +838,9 @@ internal class UnlockStatePluginScoped : IInternalDisposableService, IUnlockStat
|
|||
/// <inheritdoc/>
|
||||
public bool IsMKDLoreUnlocked(MKDLore row) => this.unlockStateService.IsMKDLoreUnlocked(row);
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool IsMcGuffinUnlocked(McGuffin row) => this.unlockStateService.IsMcGuffinUnlocked(row);
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool IsMountUnlocked(Mount row) => this.unlockStateService.IsMountUnlocked(row);
|
||||
|
||||
|
|
@ -822,6 +859,9 @@ internal class UnlockStatePluginScoped : IInternalDisposableService, IUnlockStat
|
|||
/// <inheritdoc/>
|
||||
public bool IsPublicContentUnlocked(PublicContentSheet row) => this.unlockStateService.IsPublicContentUnlocked(row);
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool IsQuestCompleted(Quest row) => this.unlockStateService.IsQuestCompleted(row);
|
||||
|
||||
/// <inheritdoc/>
|
||||
public bool IsRecipeUnlocked(Recipe row) => this.unlockStateService.IsRecipeUnlocked(row);
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ using System.Numerics;
|
|||
using System.Text;
|
||||
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Interface.Utility.Raii;
|
||||
using Dalamud.Data;
|
||||
using Dalamud.Interface.ImGuiNotification;
|
||||
using Dalamud.Interface.ImGuiNotification.Internal;
|
||||
using Dalamud.Interface.ImGuiSeStringRenderer.Internal;
|
||||
using Dalamud.Interface.Utility.Raii;
|
||||
|
||||
using Lumina.Excel.Sheets;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ using Dalamud.Game.ClientState.Keys;
|
|||
using Dalamud.Interface.Colors;
|
||||
using Dalamud.Interface.Components;
|
||||
using Dalamud.Interface.Internal;
|
||||
using Dalamud.Interface.Internal.Windows.StyleEditor;
|
||||
using Dalamud.Interface.Textures.Internal;
|
||||
using Dalamud.Interface.Textures.TextureWraps;
|
||||
using Dalamud.Interface.Utility;
|
||||
|
|
@ -461,7 +462,7 @@ public abstract class Window
|
|||
ImGuiHelpers.ForceNextWindowMainViewport();
|
||||
|
||||
var wasFocused = this.IsFocused;
|
||||
if (wasFocused)
|
||||
if (wasFocused && this is not StyleEditorWindow)
|
||||
{
|
||||
var style = ImGui.GetStyle();
|
||||
var focusedHeaderColor = style.Colors[(int)ImGuiCol.TitleBgActive];
|
||||
|
|
@ -616,7 +617,7 @@ public abstract class Window
|
|||
this.DrawTitleBarButtons();
|
||||
}
|
||||
|
||||
if (wasFocused)
|
||||
if (wasFocused && this is not StyleEditorWindow)
|
||||
{
|
||||
ImGui.PopStyleColor();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -205,6 +205,13 @@ public interface IUnlockState : IDalamudService
|
|||
/// <returns><see langword="true"/> if unlocked; otherwise, <see langword="false"/>.</returns>
|
||||
bool IsItemUnlocked(Item row);
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the specified Leve is completed.
|
||||
/// </summary>
|
||||
/// <param name="row">The Leve row to check.</param>
|
||||
/// <returns><see langword="true"/> if completed; otherwise, <see langword="false"/>.</returns>
|
||||
bool IsLeveCompleted(Leve row);
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the specified McGuffin is unlocked.
|
||||
/// </summary>
|
||||
|
|
@ -268,6 +275,13 @@ public interface IUnlockState : IDalamudService
|
|||
/// <returns><see langword="true"/> if unlocked; otherwise, <see langword="false"/>.</returns>
|
||||
bool IsPublicContentUnlocked(PublicContent row);
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the specified Quest is completed.
|
||||
/// </summary>
|
||||
/// <param name="row">The Quest row to check.</param>
|
||||
/// <returns><see langword="true"/> if completed; otherwise, <see langword="false"/>.</returns>
|
||||
bool IsQuestCompleted(Quest row);
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the specified Recipe is unlocked.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit d83e0c13d3c802d4a483f373edcd129bc4802073
|
||||
Subproject commit 1270470855d6ac2d2f726b07019e21644c5658ec
|
||||
Loading…
Add table
Add a link
Reference in a new issue