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;
/// <inheritdoc />
public bool IsFavourite => this.data.IsFavourite != 0;
public bool IsFavourite => this.data.IsFavourite;
/// <inheritdoc />
public bool IsSharedHouse => this.data.IsSharedHouse;

View file

@ -65,7 +65,8 @@ public enum ConditionFlag
/// </summary>
RidingPillion = 10,
[Obsolete("Renamed to RidingPillion", true)] Mounted2 = 10,
[Obsolete("Renamed to RidingPillion", true)]
Mounted2 = 10,
/// <summary>
/// Unable to execute command while in that position.
@ -429,7 +430,8 @@ public enum ConditionFlag
/// </summary>
MountImmobile = 88,
[Obsolete("Renamed to MountImmobile", true)] InThisState88 = 88,
[Obsolete("Renamed to MountImmobile", true)]
InThisState88 = 88,
/// <summary>
/// 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());
/// <inheritdoc/>
public bool IsCasting => this.Struct->GetCastInfo()->IsCasting > 0;
public bool IsCasting => this.Struct->GetCastInfo()->IsCasting;
/// <inheritdoc/>
public bool IsCastInterruptible => this.Struct->GetCastInfo()->Interruptible > 0;
public bool IsCastInterruptible => this.Struct->GetCastInfo()->Interruptible;
/// <inheritdoc/>
public byte CastActionType => (byte)this.Struct->GetCastInfo()->ActionType;

View file

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

View file

@ -451,14 +451,14 @@ internal sealed unsafe class ContextMenu : IInternalDisposableService, IContextM
case ContextMenuType.Default:
{
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;
}
case ContextMenuType.Inventory:
{
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;
}

View file

@ -295,7 +295,7 @@ internal sealed unsafe class GameGui : IInternalDisposableService, IGameGui
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.HoveredAction.ActionKind = (HoverActionKind)actionKind;

View file

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

View file

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

View file

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

View file

@ -81,11 +81,10 @@ internal unsafe class AtkArrayDataBrowserWidget : IDataWindowWidget
var stringArrayData = (StringArrayData*)arrays[arrayIndex];
for (var rowIndex = 0; rowIndex < arrays[arrayIndex]->Size; rowIndex++)
{
var isNull = (nint)stringArrayData->StringArray[rowIndex] == 0;
if (isNull)
if (!stringArrayData->StringArray[rowIndex].HasValue)
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++;
}
@ -289,7 +288,7 @@ internal unsafe class AtkArrayDataBrowserWidget : IDataWindowWidget
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)
continue;
@ -298,7 +297,7 @@ internal unsafe class AtkArrayDataBrowserWidget : IDataWindowWidget
if (isNull)
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;
}
@ -312,7 +311,7 @@ internal unsafe class AtkArrayDataBrowserWidget : IDataWindowWidget
if (this.showTextAddress)
{
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
{
@ -322,7 +321,7 @@ internal unsafe class AtkArrayDataBrowserWidget : IDataWindowWidget
ImGui.TableNextColumn(); // Managed
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
@ -330,11 +329,11 @@ internal unsafe class AtkArrayDataBrowserWidget : IDataWindowWidget
{
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
{
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);
changes |= ImGui.SliderFloat2("WindowTitleAlign", ref style.WindowTitleAlign, 0.0f, 1.0f, "%.2f");
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);
changes = true;
}

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