mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
chore: Fix most 6.51 warnings (#1514)
This commit is contained in:
parent
9ccc389b0b
commit
e538763f20
7 changed files with 26 additions and 24 deletions
|
|
@ -21,16 +21,6 @@ namespace Dalamud.Game.Addon.Lifecycle;
|
||||||
[ServiceManager.EarlyLoadedService]
|
[ServiceManager.EarlyLoadedService]
|
||||||
internal unsafe class AddonLifecycle : IDisposable, IServiceType
|
internal unsafe class AddonLifecycle : IDisposable, IServiceType
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// List of all AddonLifecycle ReceiveEvent Listener Hooks.
|
|
||||||
/// </summary>
|
|
||||||
internal readonly List<AddonLifecycleReceiveEventListener> ReceiveEventListeners = new();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// List of all AddonLifecycle Event Listeners.
|
|
||||||
/// </summary>
|
|
||||||
internal readonly List<AddonLifecycleEventListener> EventListeners = new();
|
|
||||||
|
|
||||||
private static readonly ModuleLog Log = new("AddonLifecycle");
|
private static readonly ModuleLog Log = new("AddonLifecycle");
|
||||||
|
|
||||||
[ServiceManager.ServiceDependency]
|
[ServiceManager.ServiceDependency]
|
||||||
|
|
@ -81,6 +71,16 @@ internal unsafe class AddonLifecycle : IDisposable, IServiceType
|
||||||
private delegate void AddonOnRequestedUpdateDelegate(AtkUnitBase* addon, NumberArrayData** numberArrayData, StringArrayData** stringArrayData);
|
private delegate void AddonOnRequestedUpdateDelegate(AtkUnitBase* addon, NumberArrayData** numberArrayData, StringArrayData** stringArrayData);
|
||||||
|
|
||||||
private delegate byte AddonOnRefreshDelegate(AtkUnitManager* unitManager, AtkUnitBase* addon, uint valueCount, AtkValue* values);
|
private delegate byte AddonOnRefreshDelegate(AtkUnitManager* unitManager, AtkUnitBase* addon, uint valueCount, AtkValue* values);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a list of all AddonLifecycle ReceiveEvent Listener Hooks.
|
||||||
|
/// </summary>
|
||||||
|
internal List<AddonLifecycleReceiveEventListener> ReceiveEventListeners { get; } = new();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a list of all AddonLifecycle Event Listeners.
|
||||||
|
/// </summary>
|
||||||
|
internal List<AddonLifecycleEventListener> EventListeners { get; } = new();
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
|
|
|
||||||
|
|
@ -413,7 +413,7 @@ internal sealed unsafe class DtrBar : IDisposable, IServiceType, IDtrBar
|
||||||
newTextNode->AtkResNode.NodeID = nodeId;
|
newTextNode->AtkResNode.NodeID = nodeId;
|
||||||
newTextNode->AtkResNode.Type = NodeType.Text;
|
newTextNode->AtkResNode.Type = NodeType.Text;
|
||||||
newTextNode->AtkResNode.NodeFlags = NodeFlags.AnchorLeft | NodeFlags.AnchorTop | NodeFlags.Enabled | NodeFlags.RespondToMouse | NodeFlags.HasCollision | NodeFlags.EmitsEvents;
|
newTextNode->AtkResNode.NodeFlags = NodeFlags.AnchorLeft | NodeFlags.AnchorTop | NodeFlags.Enabled | NodeFlags.RespondToMouse | NodeFlags.HasCollision | NodeFlags.EmitsEvents;
|
||||||
newTextNode->AtkResNode.DrawFlags = 12;
|
newTextNode->AtkResNode.ViewFlags = (NodeViewFlags)12;
|
||||||
newTextNode->AtkResNode.SetWidth(22);
|
newTextNode->AtkResNode.SetWidth(22);
|
||||||
newTextNode->AtkResNode.SetHeight(22);
|
newTextNode->AtkResNode.SetHeight(22);
|
||||||
newTextNode->AtkResNode.SetPositionFloat(-200, 2);
|
newTextNode->AtkResNode.SetPositionFloat(-200, 2);
|
||||||
|
|
|
||||||
|
|
@ -368,17 +368,6 @@ public class SeString
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetMapLinkNameString(string placeName, int? instance, string coordinateString)
|
|
||||||
{
|
|
||||||
var instanceString = string.Empty;
|
|
||||||
if (instance is > 0 and < 10)
|
|
||||||
{
|
|
||||||
instanceString = (SeIconChar.Instance1 + instance.Value - 1).ToIconString();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $"{placeName}{instanceString} {coordinateString}";
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates an SeString representing an entire payload chain that can be used to link party finder listings in the chat log.
|
/// Creates an SeString representing an entire payload chain that can be used to link party finder listings in the chat log.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -512,4 +501,15 @@ public class SeString
|
||||||
{
|
{
|
||||||
return this.TextValue;
|
return this.TextValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static string GetMapLinkNameString(string placeName, int? instance, string coordinateString)
|
||||||
|
{
|
||||||
|
var instanceString = string.Empty;
|
||||||
|
if (instance is > 0 and < 10)
|
||||||
|
{
|
||||||
|
instanceString = (SeIconChar.Instance1 + instance.Value - 1).ToIconString();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $"{placeName}{instanceString} {coordinateString}";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -249,7 +249,6 @@ internal class DalamudInterface : IDisposable, IServiceType
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Opens the <see cref="PluginInstallerWindow"/> on the plugin installed.
|
/// Opens the <see cref="PluginInstallerWindow"/> on the plugin installed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="kind">The page of the installer to open.</param>
|
|
||||||
public void OpenPluginInstaller()
|
public void OpenPluginInstaller()
|
||||||
{
|
{
|
||||||
this.pluginWindow.OpenTo(this.configuration.PluginInstallerOpen);
|
this.pluginWindow.OpenTo(this.configuration.PluginInstallerOpen);
|
||||||
|
|
@ -394,6 +393,7 @@ internal class DalamudInterface : IDisposable, IServiceType
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Toggles the <see cref="PluginInstallerWindow"/>.
|
/// Toggles the <see cref="PluginInstallerWindow"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="kind">The page of the installer to open.</param>
|
||||||
public void TogglePluginInstallerWindowTo(PluginInstallerWindow.PluginInstallerOpenKind kind) => this.pluginWindow.ToggleTo(kind);
|
public void TogglePluginInstallerWindowTo(PluginInstallerWindow.PluginInstallerOpenKind kind) => this.pluginWindow.ToggleTo(kind);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -215,7 +215,7 @@ internal unsafe class UiDebug
|
||||||
while (b > byte.MaxValue) b -= byte.MaxValue;
|
while (b > byte.MaxValue) b -= byte.MaxValue;
|
||||||
while (b < byte.MinValue) b += byte.MaxValue;
|
while (b < byte.MinValue) b += byte.MaxValue;
|
||||||
textNode->AlignmentFontType = (byte)b;
|
textNode->AlignmentFontType = (byte)b;
|
||||||
textNode->AtkResNode.DrawFlags |= 0x1;
|
textNode->AtkResNode.ViewFlags |= NodeViewFlags.IsDirty;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.Text($"Color: #{textNode->TextColor.R:X2}{textNode->TextColor.G:X2}{textNode->TextColor.B:X2}{textNode->TextColor.A:X2}");
|
ImGui.Text($"Color: #{textNode->TextColor.R:X2}{textNode->TextColor.G:X2}{textNode->TextColor.B:X2}{textNode->TextColor.A:X2}");
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
using Dalamud.Game.Addon.Lifecycle;
|
using Dalamud.Game.Addon.Lifecycle;
|
||||||
using Dalamud.Interface.Utility;
|
using Dalamud.Interface.Utility;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
using CheapLoc;
|
using CheapLoc;
|
||||||
using Dalamud.Configuration.Internal;
|
using Dalamud.Configuration.Internal;
|
||||||
using Dalamud.Game.ClientState.Keys;
|
using Dalamud.Game.ClientState.Keys;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue