bump cs, fix warnings

This commit is contained in:
Kaz Wolfe 2025-08-04 21:11:06 -07:00
parent d3bd5f1dce
commit ff36f08d0c
No known key found for this signature in database
GPG key ID: 258813F53A16EBB4
12 changed files with 27 additions and 24 deletions

View file

@ -97,7 +97,7 @@ internal sealed class AetheryteEntry : IAetheryteEntry
public uint GilCost => this.data.GilCost; public uint GilCost => this.data.GilCost;
/// <inheritdoc /> /// <inheritdoc />
public bool IsFavourite => this.data.IsFavourite != 0; public bool IsFavourite => this.data.IsFavourite;
/// <inheritdoc /> /// <inheritdoc />
public bool IsSharedHouse => this.data.IsSharedHouse; public bool IsSharedHouse => this.data.IsSharedHouse;

View file

@ -65,7 +65,8 @@ public enum ConditionFlag
/// </summary> /// </summary>
RidingPillion = 10, RidingPillion = 10,
[Obsolete("Renamed to RidingPillion", true)] Mounted2 = 10, [Obsolete("Renamed to RidingPillion", true)]
Mounted2 = 10,
/// <summary> /// <summary>
/// Unable to execute command while in that position. /// Unable to execute command while in that position.
@ -429,7 +430,8 @@ public enum ConditionFlag
/// </summary> /// </summary>
MountImmobile = 88, MountImmobile = 88,
[Obsolete("Renamed to MountImmobile", true)] InThisState88 = 88, [Obsolete("Renamed to MountImmobile", true)]
InThisState88 = 88,
/// <summary> /// <summary>
/// Unable to execute command in this state. /// Unable to execute command in this state.

View file

@ -77,10 +77,10 @@ internal unsafe class BattleChara : Character, IBattleChara
public StatusList StatusList => new(this.Struct->GetStatusManager()); public StatusList StatusList => new(this.Struct->GetStatusManager());
/// <inheritdoc/> /// <inheritdoc/>
public bool IsCasting => this.Struct->GetCastInfo()->IsCasting > 0; public bool IsCasting => this.Struct->GetCastInfo()->IsCasting;
/// <inheritdoc/> /// <inheritdoc/>
public bool IsCastInterruptible => this.Struct->GetCastInfo()->Interruptible > 0; public bool IsCastInterruptible => this.Struct->GetCastInfo()->Interruptible;
/// <inheritdoc/> /// <inheritdoc/>
public byte CastActionType => (byte)this.Struct->GetCastInfo()->ActionType; public byte CastActionType => (byte)this.Struct->GetCastInfo()->ActionType;

View file

@ -128,7 +128,7 @@ internal unsafe class PartyMember : IPartyMember
/// <summary> /// <summary>
/// Gets the position of the party member. /// Gets the position of the party member.
/// </summary> /// </summary>
public Vector3 Position => new(this.Struct->X, this.Struct->Y, this.Struct->Z); public Vector3 Position => this.Struct->Position;
/// <summary> /// <summary>
/// Gets the content ID of the party member. /// Gets the content ID of the party member.

View file

@ -451,14 +451,14 @@ internal sealed unsafe class ContextMenu : IInternalDisposableService, IContextM
case ContextMenuType.Default: case ContextMenuType.Default:
{ {
var ownerAddonId = ((AgentContext*)this.SelectedAgent)->OwnerAddon; var ownerAddonId = ((AgentContext*)this.SelectedAgent)->OwnerAddon;
module->OpenAddon(this.AddonContextSubNameId, (uint)valueCount, values, this.SelectedAgent, 71, checked((ushort)ownerAddonId), 4); module->OpenAddon(this.AddonContextSubNameId, (uint)valueCount, values, &this.SelectedAgent->AtkEventInterface, 71, checked((ushort)ownerAddonId), 4);
break; break;
} }
case ContextMenuType.Inventory: case ContextMenuType.Inventory:
{ {
var ownerAddonId = ((AgentInventoryContext*)this.SelectedAgent)->OwnerAddonId; var ownerAddonId = ((AgentInventoryContext*)this.SelectedAgent)->OwnerAddonId;
module->OpenAddon(this.AddonContextSubNameId, (uint)valueCount, values, this.SelectedAgent, 0, checked((ushort)ownerAddonId), 4); module->OpenAddon(this.AddonContextSubNameId, (uint)valueCount, values, &this.SelectedAgent->AtkEventInterface, 0, checked((ushort)ownerAddonId), 4);
break; break;
} }

View file

@ -295,7 +295,7 @@ internal sealed unsafe class GameGui : IInternalDisposableService, IGameGui
return ret; return ret;
} }
private void HandleActionHoverDetour(AgentActionDetail* hoverState, FFXIVClientStructs.FFXIV.Client.UI.Agent.ActionKind actionKind, uint actionId, int a4, byte a5) private void HandleActionHoverDetour(AgentActionDetail* hoverState, FFXIVClientStructs.FFXIV.Client.UI.Agent.ActionKind actionKind, uint actionId, int a4, bool a5)
{ {
this.handleActionHoverHook.Original(hoverState, actionKind, actionId, a4, a5); this.handleActionHoverHook.Original(hoverState, actionKind, actionId, a4, a5);
this.HoveredAction.ActionKind = (HoverActionKind)actionKind; this.HoveredAction.ActionKind = (HoverActionKind)actionKind;

View file

@ -275,7 +275,7 @@ internal unsafe class NetworkHandlers : IInternalDisposableService
if (uploaderId == 0) if (uploaderId == 0)
{ {
var playerState = PlayerState.Instance(); var playerState = PlayerState.Instance();
if (playerState->IsLoaded == 1) if (playerState->IsLoaded)
{ {
uploaderId = playerState->ContentId; uploaderId = playerState->ContentId;
} }

View file

@ -7,6 +7,7 @@ using System.Linq;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Threading; using System.Threading;
using Iced.Intel; using Iced.Intel;
using Newtonsoft.Json; using Newtonsoft.Json;
using Serilog; using Serilog;

View file

@ -518,15 +518,15 @@ internal partial class InterfaceManager : IInternalDisposableService
/// <summary> Safely invoke <seealso cref="DefaultGlobalScaleChanged"/>. </summary> /// <summary> Safely invoke <seealso cref="DefaultGlobalScaleChanged"/>. </summary>
internal void InvokeGlobalScaleChanged() internal void InvokeGlobalScaleChanged()
=> DefaultGlobalScaleChanged.InvokeSafely(); => this.DefaultGlobalScaleChanged.InvokeSafely();
/// <summary> Safely invoke <seealso cref="DefaultFontChanged"/>. </summary> /// <summary> Safely invoke <seealso cref="DefaultFontChanged"/>. </summary>
internal void InvokeFontChanged() internal void InvokeFontChanged()
=> DefaultFontChanged.InvokeSafely(); => this.DefaultFontChanged.InvokeSafely();
/// <summary> Safely invoke <seealso cref="DefaultStyleChanged"/>. </summary> /// <summary> Safely invoke <seealso cref="DefaultStyleChanged"/>. </summary>
internal void InvokeStyleChanged() internal void InvokeStyleChanged()
=> DefaultStyleChanged.InvokeSafely(); => this.DefaultStyleChanged.InvokeSafely();
private static InterfaceManager WhenFontsReady() private static InterfaceManager WhenFontsReady()
{ {

View file

@ -81,11 +81,10 @@ internal unsafe class AtkArrayDataBrowserWidget : IDataWindowWidget
var stringArrayData = (StringArrayData*)arrays[arrayIndex]; var stringArrayData = (StringArrayData*)arrays[arrayIndex];
for (var rowIndex = 0; rowIndex < arrays[arrayIndex]->Size; rowIndex++) for (var rowIndex = 0; rowIndex < arrays[arrayIndex]->Size; rowIndex++)
{ {
var isNull = (nint)stringArrayData->StringArray[rowIndex] == 0; if (!stringArrayData->StringArray[rowIndex].HasValue)
if (isNull)
continue; continue;
if (new ReadOnlySeStringSpan(stringArrayData->StringArray[rowIndex]).ExtractText().Contains(this.searchTerm, StringComparison.InvariantCultureIgnoreCase)) if (new ReadOnlySeStringSpan(stringArrayData->StringArray[rowIndex].Value).ExtractText().Contains(this.searchTerm, StringComparison.InvariantCultureIgnoreCase))
rowsFound++; rowsFound++;
} }
@ -289,7 +288,7 @@ internal unsafe class AtkArrayDataBrowserWidget : IDataWindowWidget
for (var i = 0; i < array->Size; i++) for (var i = 0; i < array->Size; i++)
{ {
var isNull = (nint)array->StringArray[i] == 0; var isNull = !array->StringArray[i].HasValue;
if (isNull && this.hideUnsetStringArrayEntries) if (isNull && this.hideUnsetStringArrayEntries)
continue; continue;
@ -298,7 +297,7 @@ internal unsafe class AtkArrayDataBrowserWidget : IDataWindowWidget
if (isNull) if (isNull)
continue; continue;
if (!new ReadOnlySeStringSpan(array->StringArray[i]).ExtractText().Contains(this.searchTerm, StringComparison.InvariantCultureIgnoreCase)) if (!new ReadOnlySeStringSpan(array->StringArray[i].Value).ExtractText().Contains(this.searchTerm, StringComparison.InvariantCultureIgnoreCase))
continue; continue;
} }
@ -312,7 +311,7 @@ internal unsafe class AtkArrayDataBrowserWidget : IDataWindowWidget
if (this.showTextAddress) if (this.showTextAddress)
{ {
if (!isNull) if (!isNull)
WidgetUtil.DrawCopyableText($"0x{(nint)array->StringArray[i]:X}", "Copy text address"); WidgetUtil.DrawCopyableText($"0x{(nint)array->StringArray[i].Value:X}", "Copy text address");
} }
else else
{ {
@ -322,7 +321,7 @@ internal unsafe class AtkArrayDataBrowserWidget : IDataWindowWidget
ImGui.TableNextColumn(); // Managed ImGui.TableNextColumn(); // Managed
if (!isNull) if (!isNull)
{ {
ImGui.Text(((nint)array->StringArray[i] != 0 && array->ManagedStringArray[i] == array->StringArray[i]).ToString()); ImGui.Text((array->StringArray[i].HasValue && array->ManagedStringArray[i].Value == array->StringArray[i]).ToString());
} }
ImGui.TableNextColumn(); // Text ImGui.TableNextColumn(); // Text
@ -330,11 +329,11 @@ internal unsafe class AtkArrayDataBrowserWidget : IDataWindowWidget
{ {
if (this.showMacroString) if (this.showMacroString)
{ {
WidgetUtil.DrawCopyableText(new ReadOnlySeStringSpan(array->StringArray[i]).ToString(), "Copy text"); WidgetUtil.DrawCopyableText(new ReadOnlySeStringSpan(array->StringArray[i].Value).ToString(), "Copy text");
} }
else else
{ {
ImGuiHelpers.SeStringWrapped(new ReadOnlySeStringSpan(array->StringArray[i])); ImGuiHelpers.SeStringWrapped(new ReadOnlySeStringSpan(array->StringArray[i].Value));
} }
} }
} }

View file

@ -254,7 +254,8 @@ public class StyleEditorWindow : Window
ImGui.Text("Alignment"u8); ImGui.Text("Alignment"u8);
changes |= ImGui.SliderFloat2("WindowTitleAlign", ref style.WindowTitleAlign, 0.0f, 1.0f, "%.2f"); changes |= ImGui.SliderFloat2("WindowTitleAlign", ref style.WindowTitleAlign, 0.0f, 1.0f, "%.2f");
var windowMenuButtonPosition = (int)style.WindowMenuButtonPosition + 1; var windowMenuButtonPosition = (int)style.WindowMenuButtonPosition + 1;
if (ImGui.Combo("WindowMenuButtonPosition"u8, ref windowMenuButtonPosition, ["None", "Left", "Right"])) { if (ImGui.Combo("WindowMenuButtonPosition"u8, ref windowMenuButtonPosition, ["None", "Left", "Right"]))
{
style.WindowMenuButtonPosition = (ImGuiDir)(windowMenuButtonPosition - 1); style.WindowMenuButtonPosition = (ImGuiDir)(windowMenuButtonPosition - 1);
changes = true; changes = true;
} }

@ -1 +1 @@
Subproject commit 2942549605a0b1c7dfb274afabfe7db0332415bc Subproject commit 0904cf9f8e612722fe7bd56cfd1c4e54cea48218