diff --git a/Dalamud/Game/ClientState/Buddy/BuddyList.cs b/Dalamud/Game/ClientState/Buddy/BuddyList.cs index 44774a574..dbac76518 100644 --- a/Dalamud/Game/ClientState/Buddy/BuddyList.cs +++ b/Dalamud/Game/ClientState/Buddy/BuddyList.cs @@ -2,11 +2,13 @@ using System.Collections; using System.Collections.Generic; using System.Runtime.CompilerServices; +using Dalamud.Game.Player; using Dalamud.IoC; using Dalamud.IoC.Internal; using Dalamud.Plugin.Services; -using FFXIVClientStructs.FFXIV.Client.Game.UI; +using CSBuddy = FFXIVClientStructs.FFXIV.Client.Game.UI.Buddy; +using CSUIState = FFXIVClientStructs.FFXIV.Client.Game.UI.UIState; namespace Dalamud.Game.ClientState.Buddy; @@ -24,7 +26,7 @@ internal sealed partial class BuddyList : IServiceType, IBuddyList private const uint InvalidObjectID = 0xE0000000; [ServiceManager.ServiceDependency] - private readonly PlayerState.PlayerState playerState = Service.Get(); + private readonly PlayerState playerState = Service.Get(); [ServiceManager.ServiceConstructor] private BuddyList() @@ -69,7 +71,7 @@ internal sealed partial class BuddyList : IServiceType, IBuddyList } } - private unsafe FFXIVClientStructs.FFXIV.Client.Game.UI.Buddy* BuddyListStruct => &UIState.Instance()->Buddy; + private unsafe CSBuddy* BuddyListStruct => &CSUIState.Instance()->Buddy; /// public IBuddyMember? this[int index] diff --git a/Dalamud/Game/ClientState/ClientState.cs b/Dalamud/Game/ClientState/ClientState.cs index 64be5cc67..caf307683 100644 --- a/Dalamud/Game/ClientState/ClientState.cs +++ b/Dalamud/Game/ClientState/ClientState.cs @@ -6,6 +6,7 @@ using Dalamud.Game.ClientState.Objects; using Dalamud.Game.ClientState.Objects.SubKinds; using Dalamud.Game.Gui; using Dalamud.Game.Network.Internal; +using Dalamud.Game.Player; using Dalamud.Hooking; using Dalamud.IoC; using Dalamud.IoC.Internal; @@ -15,7 +16,6 @@ using Dalamud.Utility; using FFXIVClientStructs.FFXIV.Application.Network; using FFXIVClientStructs.FFXIV.Client.Game; -using FFXIVClientStructs.FFXIV.Client.Game.UI; using FFXIVClientStructs.FFXIV.Client.Network; using FFXIVClientStructs.FFXIV.Client.UI; using FFXIVClientStructs.FFXIV.Client.UI.Agent; @@ -23,6 +23,7 @@ using FFXIVClientStructs.FFXIV.Client.UI.Agent; using Lumina.Excel.Sheets; using Action = System.Action; +using CSUIState = FFXIVClientStructs.FFXIV.Client.Game.UI.UIState; namespace Dalamud.Game.ClientState; @@ -47,7 +48,7 @@ internal sealed class ClientState : IInternalDisposableService, IClientState private readonly NetworkHandlers networkHandlers = Service.Get(); [ServiceManager.ServiceDependency] - private readonly PlayerState.PlayerState playerState = Service.Get(); + private readonly PlayerState playerState = Service.Get(); [ServiceManager.ServiceDependency] private readonly ObjectTable objectTable = Service.Get(); @@ -285,7 +286,7 @@ internal sealed class ClientState : IInternalDisposableService, IClientState this.TerritoryType = (ushort)GameMain.Instance()->CurrentTerritoryTypeId; this.MapId = AgentMap.Instance()->CurrentMapId; - this.Instance = UIState.Instance()->PublicInstance.InstanceId; + this.Instance = CSUIState.Instance()->PublicInstance.InstanceId; this.initialized = true; diff --git a/Dalamud/Game/ClientState/Fates/Fate.cs b/Dalamud/Game/ClientState/Fates/Fate.cs index 5a82ef0c5..f82109fd0 100644 --- a/Dalamud/Game/ClientState/Fates/Fate.cs +++ b/Dalamud/Game/ClientState/Fates/Fate.cs @@ -1,6 +1,7 @@ using System.Numerics; using Dalamud.Data; +using Dalamud.Game.Player; using Dalamud.Game.Text.SeStringHandling; using Dalamud.Memory; @@ -153,7 +154,7 @@ internal unsafe partial class Fate if (fate == null) return false; - var playerState = Service.Get(); + var playerState = Service.Get(); return playerState.IsLoaded == true; } diff --git a/Dalamud/Game/ClientState/Fates/FateTable.cs b/Dalamud/Game/ClientState/Fates/FateTable.cs index 2266c762d..30b0f4102 100644 --- a/Dalamud/Game/ClientState/Fates/FateTable.cs +++ b/Dalamud/Game/ClientState/Fates/FateTable.cs @@ -1,6 +1,7 @@ using System.Collections; using System.Collections.Generic; +using Dalamud.Game.Player; using Dalamud.IoC; using Dalamud.IoC.Internal; using Dalamud.Plugin.Services; @@ -63,7 +64,7 @@ internal sealed partial class FateTable : IServiceType, IFateTable if (fate == null) return false; - var playerState = Service.Get(); + var playerState = Service.Get(); return playerState.IsLoaded == true; } @@ -86,7 +87,7 @@ internal sealed partial class FateTable : IServiceType, IFateTable if (offset == IntPtr.Zero) return null; - var playerState = Service.Get(); + var playerState = Service.Get(); if (!playerState.IsLoaded) return null; diff --git a/Dalamud/Game/ClientState/Objects/ObjectTable.cs b/Dalamud/Game/ClientState/Objects/ObjectTable.cs index 0a5e900f0..b66dd4775 100644 --- a/Dalamud/Game/ClientState/Objects/ObjectTable.cs +++ b/Dalamud/Game/ClientState/Objects/ObjectTable.cs @@ -5,6 +5,7 @@ using System.Runtime.CompilerServices; using Dalamud.Game.ClientState.Objects.Enums; using Dalamud.Game.ClientState.Objects.SubKinds; using Dalamud.Game.ClientState.Objects.Types; +using Dalamud.Game.Player; using Dalamud.IoC; using Dalamud.IoC.Internal; using Dalamud.Plugin.Services; @@ -32,7 +33,7 @@ internal sealed partial class ObjectTable : IServiceType, IObjectTable private static int objectTableLength; [ServiceManager.ServiceDependency] - private readonly PlayerState.PlayerState playerState = Service.Get(); + private readonly PlayerState playerState = Service.Get(); private readonly CachedEntry[] cachedObjectTable; diff --git a/Dalamud/Game/ClientState/Objects/Types/GameObject.cs b/Dalamud/Game/ClientState/Objects/Types/GameObject.cs index c37b72961..4b331a479 100644 --- a/Dalamud/Game/ClientState/Objects/Types/GameObject.cs +++ b/Dalamud/Game/ClientState/Objects/Types/GameObject.cs @@ -1,6 +1,7 @@ using System.Numerics; using Dalamud.Game.ClientState.Objects.Enums; +using Dalamud.Game.Player; using Dalamud.Game.Text.SeStringHandling; namespace Dalamud.Game.ClientState.Objects.Types; @@ -171,7 +172,7 @@ internal partial class GameObject if (actor == null) return false; - var playerState = Service.Get(); + var playerState = Service.Get(); return playerState.IsLoaded == true; } diff --git a/Dalamud/Game/ClientState/Party/PartyList.cs b/Dalamud/Game/ClientState/Party/PartyList.cs index 0a81095c6..9618b679c 100644 --- a/Dalamud/Game/ClientState/Party/PartyList.cs +++ b/Dalamud/Game/ClientState/Party/PartyList.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using Dalamud.Game.Player; using Dalamud.IoC; using Dalamud.IoC.Internal; using Dalamud.Plugin.Services; @@ -25,7 +26,7 @@ internal sealed unsafe partial class PartyList : IServiceType, IPartyList private const int AllianceLength = 20; [ServiceManager.ServiceDependency] - private readonly PlayerState.PlayerState playerState = Service.Get(); + private readonly PlayerState playerState = Service.Get(); [ServiceManager.ServiceConstructor] private PartyList() diff --git a/Dalamud/Game/ClientState/Statuses/StatusList.cs b/Dalamud/Game/ClientState/Statuses/StatusList.cs index 04d0d822c..410ae9d7c 100644 --- a/Dalamud/Game/ClientState/Statuses/StatusList.cs +++ b/Dalamud/Game/ClientState/Statuses/StatusList.cs @@ -3,6 +3,8 @@ using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using Dalamud.Game.Player; + namespace Dalamud.Game.ClientState.Statuses; /// @@ -72,7 +74,7 @@ public sealed unsafe partial class StatusList // The use case for CreateStatusListReference and CreateStatusReference to be static is so // fake status lists can be generated. Since they aren't exposed as services, it's either // here or somewhere else. - var playerState = Service.Get(); + var playerState = Service.Get(); if (!playerState.IsLoaded) return null; @@ -89,7 +91,7 @@ public sealed unsafe partial class StatusList if (address == IntPtr.Zero) return null; - var playerState = Service.Get(); + var playerState = Service.Get(); if (!playerState.IsLoaded) return null; diff --git a/Dalamud/Game/Network/Internal/NetworkHandlers.cs b/Dalamud/Game/Network/Internal/NetworkHandlers.cs index 2f9276cc0..6a6d73b33 100644 --- a/Dalamud/Game/Network/Internal/NetworkHandlers.cs +++ b/Dalamud/Game/Network/Internal/NetworkHandlers.cs @@ -11,6 +11,7 @@ using Dalamud.Game.Gui; using Dalamud.Game.Network.Internal.MarketBoardUploaders; using Dalamud.Game.Network.Internal.MarketBoardUploaders.Universalis; using Dalamud.Game.Network.Structures; +using Dalamud.Game.Player; using Dalamud.Game.Text.SeStringHandling; using Dalamud.Hooking; using Dalamud.Networking.Http; @@ -268,7 +269,7 @@ internal unsafe class NetworkHandlers : IInternalDisposableService private static (ulong UploaderId, uint WorldId) GetUploaderInfo() { - var playerState = Service.Get(); + var playerState = Service.Get(); return (playerState.ContentId, playerState.CurrentWorld.RowId); } diff --git a/Dalamud/Game/PlayerState/MentorVersion.cs b/Dalamud/Game/Player/MentorVersion.cs similarity index 95% rename from Dalamud/Game/PlayerState/MentorVersion.cs rename to Dalamud/Game/Player/MentorVersion.cs index 701eda112..e856e1169 100644 --- a/Dalamud/Game/PlayerState/MentorVersion.cs +++ b/Dalamud/Game/Player/MentorVersion.cs @@ -1,4 +1,4 @@ -namespace Dalamud.Game.PlayerState; +namespace Dalamud.Game.Player; /// /// Specifies the mentor certification version for a player. diff --git a/Dalamud/Game/PlayerState/PlayerAttribute.cs b/Dalamud/Game/Player/PlayerAttribute.cs similarity index 99% rename from Dalamud/Game/PlayerState/PlayerAttribute.cs rename to Dalamud/Game/Player/PlayerAttribute.cs index 4db8af107..9d9954817 100644 --- a/Dalamud/Game/PlayerState/PlayerAttribute.cs +++ b/Dalamud/Game/Player/PlayerAttribute.cs @@ -1,4 +1,4 @@ -namespace Dalamud.Game.PlayerState; +namespace Dalamud.Game.Player; /// /// Represents a player's attribute. diff --git a/Dalamud/Game/PlayerState/PlayerState.cs b/Dalamud/Game/Player/PlayerState.cs similarity index 99% rename from Dalamud/Game/PlayerState/PlayerState.cs rename to Dalamud/Game/Player/PlayerState.cs index c80166dd5..316b09e2f 100644 --- a/Dalamud/Game/PlayerState/PlayerState.cs +++ b/Dalamud/Game/Player/PlayerState.cs @@ -13,7 +13,7 @@ using Lumina.Excel.Sheets; using CSPlayerState = FFXIVClientStructs.FFXIV.Client.Game.UI.PlayerState; using GrandCompany = Lumina.Excel.Sheets.GrandCompany; -namespace Dalamud.Game.PlayerState; +namespace Dalamud.Game.Player; /// /// This class contains the PlayerState wrappers. diff --git a/Dalamud/Game/PlayerState/Sex.cs b/Dalamud/Game/Player/Sex.cs similarity index 86% rename from Dalamud/Game/PlayerState/Sex.cs rename to Dalamud/Game/Player/Sex.cs index e6ed6cc78..0981cb9a4 100644 --- a/Dalamud/Game/PlayerState/Sex.cs +++ b/Dalamud/Game/Player/Sex.cs @@ -1,4 +1,4 @@ -namespace Dalamud.Game.PlayerState; +namespace Dalamud.Game.Player; /// /// Represents the sex of a character. diff --git a/Dalamud/Game/Text/Evaluator/SeStringEvaluator.cs b/Dalamud/Game/Text/Evaluator/SeStringEvaluator.cs index a4efad488..58bcdbd0b 100644 --- a/Dalamud/Game/Text/Evaluator/SeStringEvaluator.cs +++ b/Dalamud/Game/Text/Evaluator/SeStringEvaluator.cs @@ -8,6 +8,7 @@ using Dalamud.Configuration.Internal; using Dalamud.Data; using Dalamud.Game.ClientState.Objects.Enums; using Dalamud.Game.Config; +using Dalamud.Game.Player; using Dalamud.Game.Text.Evaluator.Internal; using Dalamud.Game.Text.Noun; using Dalamud.Game.Text.Noun.Enums; @@ -68,7 +69,7 @@ internal class SeStringEvaluator : IServiceType, ISeStringEvaluator private readonly SheetRedirectResolver sheetRedirectResolver = Service.Get(); [ServiceManager.ServiceDependency] - private readonly PlayerState.PlayerState playerState = Service.Get(); + private readonly PlayerState playerState = Service.Get(); private readonly ConcurrentDictionary, string> actStrCache = []; private readonly ConcurrentDictionary, string> objStrCache = []; diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/ObjectTableWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/ObjectTableWidget.cs index 9a2de7261..71fb18352 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/ObjectTableWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/ObjectTableWidget.cs @@ -4,7 +4,7 @@ using Dalamud.Bindings.ImGui; using Dalamud.Game.ClientState; using Dalamud.Game.ClientState.Objects; using Dalamud.Game.Gui; -using Dalamud.Game.PlayerState; +using Dalamud.Game.Player; using Dalamud.Utility; namespace Dalamud.Interface.Internal.Windows.Data.Widgets; diff --git a/Dalamud/Plugin/Services/IPlayerState.cs b/Dalamud/Plugin/Services/IPlayerState.cs index 1a22f58d6..425ffc963 100644 --- a/Dalamud/Plugin/Services/IPlayerState.cs +++ b/Dalamud/Plugin/Services/IPlayerState.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using Dalamud.Game.PlayerState; +using Dalamud.Game.Player; using Lumina.Excel; using Lumina.Excel.Sheets;