refactor(Dalamud): switch to file-scoped namespaces

This commit is contained in:
goat 2021-11-17 19:42:32 +01:00
parent 13cf3d93dc
commit b5f34c3199
No known key found for this signature in database
GPG key ID: 7773BB5B43BA52E5
325 changed files with 45878 additions and 46218 deletions

View file

@ -1,10 +1,10 @@
namespace Dalamud namespace Dalamud;
/// <summary>
/// Enum describing the language the game loads in.
/// </summary>
public enum ClientLanguage
{ {
/// <summary>
/// Enum describing the language the game loads in.
/// </summary>
public enum ClientLanguage
{
/// <summary> /// <summary>
/// Indicating a Japanese game client. /// Indicating a Japanese game client.
/// </summary> /// </summary>
@ -24,5 +24,4 @@ namespace Dalamud
/// Indicating a French game client. /// Indicating a French game client.
/// </summary> /// </summary>
French, French,
}
} }

View file

@ -1,12 +1,12 @@
using System; using System;
namespace Dalamud namespace Dalamud;
/// <summary>
/// Extension methods for the <see cref="ClientLanguage"/> class.
/// </summary>
public static class ClientLanguageExtensions
{ {
/// <summary>
/// Extension methods for the <see cref="ClientLanguage"/> class.
/// </summary>
public static class ClientLanguageExtensions
{
/// <summary> /// <summary>
/// Converts a Dalamud ClientLanguage to the corresponding Lumina variant. /// Converts a Dalamud ClientLanguage to the corresponding Lumina variant.
/// </summary> /// </summary>
@ -23,5 +23,4 @@ namespace Dalamud
_ => throw new ArgumentOutOfRangeException(nameof(language)), _ => throw new ArgumentOutOfRangeException(nameof(language)),
}; };
} }
}
} }

View file

@ -1,13 +1,12 @@
namespace Dalamud.Configuration namespace Dalamud.Configuration;
/// <summary>
/// Configuration to store settings for a dalamud plugin.
/// </summary>
public interface IPluginConfiguration
{ {
/// <summary>
/// Configuration to store settings for a dalamud plugin.
/// </summary>
public interface IPluginConfiguration
{
/// <summary> /// <summary>
/// Gets or sets configuration version. /// Gets or sets configuration version.
/// </summary> /// </summary>
int Version { get; set; } int Version { get; set; }
}
} }

View file

@ -8,14 +8,14 @@ using Newtonsoft.Json;
using Serilog; using Serilog;
using Serilog.Events; using Serilog.Events;
namespace Dalamud.Configuration.Internal namespace Dalamud.Configuration.Internal;
/// <summary>
/// Class containing Dalamud settings.
/// </summary>
[Serializable]
internal sealed class DalamudConfiguration
{ {
/// <summary>
/// Class containing Dalamud settings.
/// </summary>
[Serializable]
internal sealed class DalamudConfiguration
{
private static readonly JsonSerializerSettings SerializerSettings = new() private static readonly JsonSerializerSettings SerializerSettings = new()
{ {
TypeNameHandling = TypeNameHandling.All, TypeNameHandling = TypeNameHandling.All,
@ -271,5 +271,4 @@ namespace Dalamud.Configuration.Internal
File.WriteAllText(this.configPath, JsonConvert.SerializeObject(this, SerializerSettings)); File.WriteAllText(this.configPath, JsonConvert.SerializeObject(this, SerializerSettings));
this.DalamudConfigurationSaved?.Invoke(this); this.DalamudConfigurationSaved?.Invoke(this);
} }
}
} }

View file

@ -1,10 +1,10 @@
namespace Dalamud.Configuration namespace Dalamud.Configuration.Internal;
/// <summary>
/// Additional locations to load dev plugins from.
/// </summary>
internal sealed class DevPluginLocationSettings
{ {
/// <summary>
/// Additional locations to load dev plugins from.
/// </summary>
internal sealed class DevPluginLocationSettings
{
/// <summary> /// <summary>
/// Gets or sets the dev pluign path. /// Gets or sets the dev pluign path.
/// </summary> /// </summary>
@ -20,5 +20,4 @@ namespace Dalamud.Configuration
/// </summary> /// </summary>
/// <returns>A shallow copy of this object.</returns> /// <returns>A shallow copy of this object.</returns>
public DevPluginLocationSettings Clone() => this.MemberwiseClone() as DevPluginLocationSettings; public DevPluginLocationSettings Clone() => this.MemberwiseClone() as DevPluginLocationSettings;
}
} }

View file

@ -1,10 +1,10 @@
namespace Dalamud.Configuration.Internal namespace Dalamud.Configuration.Internal;
/// <summary>
/// Settings for DevPlugins.
/// </summary>
internal sealed class DevPluginSettings
{ {
/// <summary>
/// Settings for DevPlugins.
/// </summary>
internal sealed class DevPluginSettings
{
/// <summary> /// <summary>
/// Gets or sets a value indicating whether this plugin should automatically start when Dalamud boots up. /// Gets or sets a value indicating whether this plugin should automatically start when Dalamud boots up.
/// </summary> /// </summary>
@ -14,5 +14,4 @@ namespace Dalamud.Configuration.Internal
/// Gets or sets a value indicating whether this plugin should automatically reload on file change. /// Gets or sets a value indicating whether this plugin should automatically reload on file change.
/// </summary> /// </summary>
public bool AutomaticReloading { get; set; } = false; public bool AutomaticReloading { get; set; } = false;
}
} }

View file

@ -1,12 +1,12 @@
using System; using System;
namespace Dalamud.Configuration.Internal namespace Dalamud.Configuration.Internal;
/// <summary>
/// Environmental configuration settings.
/// </summary>
internal class EnvironmentConfiguration
{ {
/// <summary>
/// Environmental configuration settings.
/// </summary>
internal class EnvironmentConfiguration
{
/// <summary> /// <summary>
/// Gets a value indicating whether the XL_WINEONLINUX setting has been enabled. /// Gets a value indicating whether the XL_WINEONLINUX setting has been enabled.
/// </summary> /// </summary>
@ -34,5 +34,4 @@ namespace Dalamud.Configuration.Internal
private static bool GetEnvironmentVariable(string name) private static bool GetEnvironmentVariable(string name)
=> bool.Parse(Environment.GetEnvironmentVariable(name) ?? "false"); => bool.Parse(Environment.GetEnvironmentVariable(name) ?? "false");
}
} }

View file

@ -1,10 +1,10 @@
namespace Dalamud.Configuration namespace Dalamud.Configuration.Internal;
/// <summary>
/// Third party repository for dalamud plugins.
/// </summary>
internal sealed class ThirdPartyRepoSettings
{ {
/// <summary>
/// Third party repository for dalamud plugins.
/// </summary>
internal sealed class ThirdPartyRepoSettings
{
/// <summary> /// <summary>
/// Gets or sets the third party repo url. /// Gets or sets the third party repo url.
/// </summary> /// </summary>
@ -25,5 +25,4 @@ namespace Dalamud.Configuration
/// </summary> /// </summary>
/// <returns>A shallow copy of this object.</returns> /// <returns>A shallow copy of this object.</returns>
public ThirdPartyRepoSettings Clone() => this.MemberwiseClone() as ThirdPartyRepoSettings; public ThirdPartyRepoSettings Clone() => this.MemberwiseClone() as ThirdPartyRepoSettings;
}
} }

View file

@ -2,13 +2,13 @@ using System.IO;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace Dalamud.Configuration namespace Dalamud.Configuration;
/// <summary>
/// Configuration to store settings for a dalamud plugin.
/// </summary>
public sealed class PluginConfigurations
{ {
/// <summary>
/// Configuration to store settings for a dalamud plugin.
/// </summary>
public sealed class PluginConfigurations
{
private readonly DirectoryInfo configDirectory; private readonly DirectoryInfo configDirectory;
/// <summary> /// <summary>
@ -126,5 +126,4 @@ namespace Dalamud.Configuration
public FileInfo GetConfigFile(string pluginName) => new(Path.Combine(this.configDirectory.FullName, $"{pluginName}.json")); public FileInfo GetConfigFile(string pluginName) => new(Path.Combine(this.configDirectory.FullName, $"{pluginName}.json"));
private DirectoryInfo GetDirectoryPath(string pluginName) => new(Path.Combine(this.configDirectory.FullName, pluginName)); private DirectoryInfo GetDirectoryPath(string pluginName) => new(Path.Combine(this.configDirectory.FullName, pluginName));
}
} }

View file

@ -33,13 +33,13 @@ using Serilog.Events;
[assembly: InternalsVisibleTo("Dalamud.Test")] [assembly: InternalsVisibleTo("Dalamud.Test")]
namespace Dalamud namespace Dalamud;
/// <summary>
/// The main Dalamud class containing all subsystems.
/// </summary>
internal sealed class Dalamud : IDisposable
{ {
/// <summary>
/// The main Dalamud class containing all subsystems.
/// </summary>
internal sealed class Dalamud : IDisposable
{
#region Internals #region Internals
private readonly ManualResetEvent unloadSignal; private readonly ManualResetEvent unloadSignal;
@ -407,5 +407,4 @@ namespace Dalamud
var handlePatch = typeof(Dalamud).GetMethod(nameof(Dalamud.ProcessHandlePatch), BindingFlags.NonPublic | BindingFlags.Static); var handlePatch = typeof(Dalamud).GetMethod(nameof(Dalamud.ProcessHandlePatch), BindingFlags.NonPublic | BindingFlags.Static);
this.processMonoHook = new MonoMod.RuntimeDetour.Hook(handleTarget, handlePatch); this.processMonoHook = new MonoMod.RuntimeDetour.Hook(handleTarget, handlePatch);
} }
}
} }

View file

@ -3,14 +3,14 @@ using System;
using Dalamud.Game; using Dalamud.Game;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace Dalamud namespace Dalamud;
/// <summary>
/// Struct containing information needed to initialize Dalamud.
/// </summary>
[Serializable]
public record DalamudStartInfo
{ {
/// <summary>
/// Struct containing information needed to initialize Dalamud.
/// </summary>
[Serializable]
public record DalamudStartInfo
{
/// <summary> /// <summary>
/// Gets or sets the working directory of the XIVLauncher installations. /// Gets or sets the working directory of the XIVLauncher installations.
/// </summary> /// </summary>
@ -56,5 +56,4 @@ namespace Dalamud
/// Gets a value that specifies how much to wait before a new Dalamud session. /// Gets a value that specifies how much to wait before a new Dalamud session.
/// </summary> /// </summary>
public int DelayInitializeMs { get; init; } = 0; public int DelayInitializeMs { get; init; } = 0;
}
} }

View file

@ -18,15 +18,15 @@ using Lumina.Excel;
using Newtonsoft.Json; using Newtonsoft.Json;
using Serilog; using Serilog;
namespace Dalamud.Data namespace Dalamud.Data;
/// <summary>
/// This class provides data for Dalamud-internal features, but can also be used by plugins if needed.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed class DataManager : IDisposable
{ {
/// <summary>
/// This class provides data for Dalamud-internal features, but can also be used by plugins if needed.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed class DataManager : IDisposable
{
private const string IconFileFormat = "ui/icon/{0:D3}000/{1}{2:D6}.tex"; private const string IconFileFormat = "ui/icon/{0:D3}000/{1}{2:D6}.tex";
private Thread luminaResourceThread; private Thread luminaResourceThread;
@ -343,5 +343,4 @@ namespace Dalamud.Data
Log.Error(ex, "Could not download data."); Log.Error(ex, "Could not download data.");
} }
} }
}
} }

View file

@ -21,13 +21,13 @@ using Serilog.Events;
using static Dalamud.NativeFunctions; using static Dalamud.NativeFunctions;
namespace Dalamud namespace Dalamud;
/// <summary>
/// The main entrypoint for the Dalamud system.
/// </summary>
public sealed class EntryPoint
{ {
/// <summary>
/// The main entrypoint for the Dalamud system.
/// </summary>
public sealed class EntryPoint
{
/// <summary> /// <summary>
/// A delegate used during initialization of the CLR from Dalamud.Boot. /// A delegate used during initialization of the CLR from Dalamud.Boot.
/// </summary> /// </summary>
@ -278,5 +278,4 @@ namespace Dalamud
if (!args.Observed) if (!args.Observed)
Log.Error(args.Exception, "Unobserved exception in Task."); Log.Error(args.Exception, "Unobserved exception in Task.");
} }
}
} }

View file

@ -3,13 +3,13 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Dalamud.Game namespace Dalamud.Game;
/// <summary>
/// Base memory address resolver.
/// </summary>
public abstract class BaseAddressResolver
{ {
/// <summary>
/// Base memory address resolver.
/// </summary>
public abstract class BaseAddressResolver
{
/// <summary> /// <summary>
/// Gets a list of memory addresses that were found, to list in /xldata. /// Gets a list of memory addresses that were found, to list in /xldata.
/// </summary> /// </summary>
@ -110,5 +110,4 @@ namespace Dalamud.Game
{ {
// Do nothing // Do nothing
} }
}
} }

View file

@ -21,15 +21,15 @@ using Dalamud.Plugin.Internal;
using Dalamud.Utility; using Dalamud.Utility;
using Serilog; using Serilog;
namespace Dalamud.Game namespace Dalamud.Game;
/// <summary>
/// Chat events and public helper functions.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public class ChatHandlers
{ {
/// <summary>
/// Chat events and public helper functions.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public class ChatHandlers
{
// private static readonly Dictionary<string, string> UnicodeToDiscordEmojiDict = new() // private static readonly Dictionary<string, string> UnicodeToDiscordEmojiDict = new()
// { // {
// { "", "<:ffxive071:585847382210642069>" }, // { "", "<:ffxive071:585847382210642069>" },
@ -328,5 +328,4 @@ namespace Dalamud.Game
} }
}); });
} }
}
} }

View file

@ -7,16 +7,16 @@ using Dalamud.IoC;
using Dalamud.IoC.Internal; using Dalamud.IoC.Internal;
using Serilog; using Serilog;
namespace Dalamud.Game.ClientState.Buddy namespace Dalamud.Game.ClientState.Buddy;
/// <summary>
/// This collection represents the buddies present in your squadron or trust party.
/// It does not include the local player.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed partial class BuddyList
{ {
/// <summary>
/// This collection represents the buddies present in your squadron or trust party.
/// It does not include the local player.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed partial class BuddyList
{
private const uint InvalidObjectID = 0xE0000000; private const uint InvalidObjectID = 0xE0000000;
private readonly ClientStateAddressResolver address; private readonly ClientStateAddressResolver address;
@ -161,13 +161,13 @@ namespace Dalamud.Game.ClientState.Buddy
return buddy; return buddy;
} }
} }
/// <summary> /// <summary>
/// This collection represents the buddies present in your squadron or trust party. /// This collection represents the buddies present in your squadron or trust party.
/// </summary> /// </summary>
public sealed partial class BuddyList : IReadOnlyCollection<BuddyMember> public sealed partial class BuddyList : IReadOnlyCollection<BuddyMember>
{ {
/// <inheritdoc/> /// <inheritdoc/>
int IReadOnlyCollection<BuddyMember>.Count => this.Length; int IReadOnlyCollection<BuddyMember>.Count => this.Length;
@ -182,5 +182,4 @@ namespace Dalamud.Game.ClientState.Buddy
/// <inheritdoc/> /// <inheritdoc/>
IEnumerator IEnumerable.GetEnumerator() => this.GetEnumerator(); IEnumerator IEnumerable.GetEnumerator() => this.GetEnumerator();
}
} }

View file

@ -4,13 +4,13 @@ using Dalamud.Game.ClientState.Objects;
using Dalamud.Game.ClientState.Objects.Types; using Dalamud.Game.ClientState.Objects.Types;
using Dalamud.Game.ClientState.Resolvers; using Dalamud.Game.ClientState.Resolvers;
namespace Dalamud.Game.ClientState.Buddy namespace Dalamud.Game.ClientState.Buddy;
/// <summary>
/// This class represents a buddy such as the chocobo companion, summoned pets, squadron groups and trust parties.
/// </summary>
public unsafe class BuddyMember
{ {
/// <summary>
/// This class represents a buddy such as the chocobo companion, summoned pets, squadron groups and trust parties.
/// </summary>
public unsafe class BuddyMember
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="BuddyMember"/> class. /// Initializes a new instance of the <see cref="BuddyMember"/> class.
/// </summary> /// </summary>
@ -69,5 +69,4 @@ namespace Dalamud.Game.ClientState.Buddy
public ExcelResolver<Lumina.Excel.GeneratedSheets.DawnGrowMember> TrustData => new(this.DataID); public ExcelResolver<Lumina.Excel.GeneratedSheets.DawnGrowMember> TrustData => new(this.DataID);
private FFXIVClientStructs.FFXIV.Client.Game.UI.Buddy.BuddyMember* Struct => (FFXIVClientStructs.FFXIV.Client.Game.UI.Buddy.BuddyMember*)this.Address; private FFXIVClientStructs.FFXIV.Client.Game.UI.Buddy.BuddyMember* Struct => (FFXIVClientStructs.FFXIV.Client.Game.UI.Buddy.BuddyMember*)this.Address;
}
} }

View file

@ -16,15 +16,15 @@ using Dalamud.IoC;
using Dalamud.IoC.Internal; using Dalamud.IoC.Internal;
using Serilog; using Serilog;
namespace Dalamud.Game.ClientState namespace Dalamud.Game.ClientState;
/// <summary>
/// This class represents the state of the game client at the time of access.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed class ClientState : IDisposable
{ {
/// <summary>
/// This class represents the state of the game client at the time of access.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed class ClientState : IDisposable
{
private readonly ClientStateAddressResolver address; private readonly ClientStateAddressResolver address;
private readonly Hook<SetupTerritoryTypeDelegate> setupTerritoryTypeHook; private readonly Hook<SetupTerritoryTypeDelegate> setupTerritoryTypeHook;
@ -176,5 +176,4 @@ namespace Dalamud.Game.ClientState
this.Logout?.Invoke(this, null); this.Logout?.Invoke(this, null);
} }
} }
}
} }

View file

@ -1,12 +1,12 @@
using System; using System;
namespace Dalamud.Game.ClientState namespace Dalamud.Game.ClientState;
/// <summary>
/// Client state memory address resolver.
/// </summary>
public sealed class ClientStateAddressResolver : BaseAddressResolver
{ {
/// <summary>
/// Client state memory address resolver.
/// </summary>
public sealed class ClientStateAddressResolver : BaseAddressResolver
{
// Static offsets // Static offsets
/// <summary> /// <summary>
@ -110,5 +110,4 @@ namespace Dalamud.Game.ClientState
this.GamepadPoll = sig.ScanText("40 ?? 57 41 ?? 48 81 EC ?? ?? ?? ?? 44 0F ?? ?? ?? ?? ?? ?? ?? 48 8B"); this.GamepadPoll = sig.ScanText("40 ?? 57 41 ?? 48 81 EC ?? ?? ?? ?? 44 0F ?? ?? ?? ?? ?? ?? ?? 48 8B");
} }
}
} }

View file

@ -4,15 +4,15 @@ using Dalamud.IoC;
using Dalamud.IoC.Internal; using Dalamud.IoC.Internal;
using Serilog; using Serilog;
namespace Dalamud.Game.ClientState.Conditions namespace Dalamud.Game.ClientState.Conditions;
/// <summary>
/// Provides access to conditions (generally player state). You can check whether a player is in combat, mounted, etc.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed partial class Condition
{ {
/// <summary>
/// Provides access to conditions (generally player state). You can check whether a player is in combat, mounted, etc.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed partial class Condition
{
/// <summary> /// <summary>
/// The current max number of conditions. You can get this just by looking at the condition sheet and how many rows it has. /// The current max number of conditions. You can get this just by looking at the condition sheet and how many rows it has.
/// </summary> /// </summary>
@ -116,13 +116,13 @@ namespace Dalamud.Game.ClientState.Conditions
} }
} }
} }
} }
/// <summary> /// <summary>
/// Provides access to conditions (generally player state). You can check whether a player is in combat, mounted, etc. /// Provides access to conditions (generally player state). You can check whether a player is in combat, mounted, etc.
/// </summary> /// </summary>
public sealed partial class Condition : IDisposable public sealed partial class Condition : IDisposable
{ {
private bool isDisposed; private bool isDisposed;
/// <summary> /// <summary>
@ -154,5 +154,4 @@ namespace Dalamud.Game.ClientState.Conditions
this.isDisposed = true; this.isDisposed = true;
} }
}
} }

View file

@ -1,13 +1,13 @@
namespace Dalamud.Game.ClientState.Conditions namespace Dalamud.Game.ClientState.Conditions;
/// <summary>
/// Possible state flags (or conditions as they're called internally) that can be set on the local client.
///
/// These come from LogMessage (somewhere) and directly map to each state field managed by the client. As of 5.25, it maps to
/// LogMessage row 7700 and onwards, which can be checked by looking at the Condition sheet and looking at what column 2 maps to.
/// </summary>
public enum ConditionFlag
{ {
/// <summary>
/// Possible state flags (or conditions as they're called internally) that can be set on the local client.
///
/// These come from LogMessage (somewhere) and directly map to each state field managed by the client. As of 5.25, it maps to
/// LogMessage row 7700 and onwards, which can be checked by looking at the Condition sheet and looking at what column 2 maps to.
/// </summary>
public enum ConditionFlag
{
/// <summary> /// <summary>
/// Unused. /// Unused.
/// </summary> /// </summary>
@ -449,5 +449,4 @@ namespace Dalamud.Game.ClientState.Conditions
/// Unable to execute command while bound by duty. /// Unable to execute command while bound by duty.
/// </summary> /// </summary>
BoundByDuty95 = 95, BoundByDuty95 = 95,
}
} }

View file

@ -6,13 +6,13 @@ using Dalamud.Game.ClientState.Resolvers;
using Dalamud.Game.Text.SeStringHandling; using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Memory; using Dalamud.Memory;
namespace Dalamud.Game.ClientState.Fates namespace Dalamud.Game.ClientState.Fates;
/// <summary>
/// This class represents an FFXIV Fate.
/// </summary>
public unsafe partial class Fate : IEquatable<Fate>
{ {
/// <summary>
/// This class represents an FFXIV Fate.
/// </summary>
public unsafe partial class Fate : IEquatable<Fate>
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Fate"/> class. /// Initializes a new instance of the <see cref="Fate"/> class.
/// </summary> /// </summary>
@ -71,13 +71,13 @@ namespace Dalamud.Game.ClientState.Fates
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() => this.FateId.GetHashCode(); public override int GetHashCode() => this.FateId.GetHashCode();
} }
/// <summary> /// <summary>
/// This class represents an FFXIV Fate. /// This class represents an FFXIV Fate.
/// </summary> /// </summary>
public unsafe partial class Fate public unsafe partial class Fate
{ {
/// <summary> /// <summary>
/// Gets the Fate ID of this <see cref="Fate" />. /// Gets the Fate ID of this <see cref="Fate" />.
/// </summary> /// </summary>
@ -132,5 +132,4 @@ namespace Dalamud.Game.ClientState.Fates
/// Gets the territory this <see cref="Fate"/> is located in. /// Gets the territory this <see cref="Fate"/> is located in.
/// </summary> /// </summary>
public ExcelResolver<Lumina.Excel.GeneratedSheets.TerritoryType> TerritoryType => new(this.Struct->TerritoryID); public ExcelResolver<Lumina.Excel.GeneratedSheets.TerritoryType> TerritoryType => new(this.Struct->TerritoryID);
}
} }

View file

@ -1,10 +1,10 @@
namespace Dalamud.Game.ClientState.Fates namespace Dalamud.Game.ClientState.Fates;
/// <summary>
/// This represents the state of a single Fate.
/// </summary>
public enum FateState : byte
{ {
/// <summary>
/// This represents the state of a single Fate.
/// </summary>
public enum FateState : byte
{
/// <summary> /// <summary>
/// The Fate is active. /// The Fate is active.
/// </summary> /// </summary>
@ -29,5 +29,4 @@ namespace Dalamud.Game.ClientState.Fates
/// The Fate is preparing to end. /// The Fate is preparing to end.
/// </summary> /// </summary>
WaitingForEnd = 0x08, WaitingForEnd = 0x08,
}
} }

View file

@ -6,15 +6,15 @@ using Dalamud.IoC;
using Dalamud.IoC.Internal; using Dalamud.IoC.Internal;
using Serilog; using Serilog;
namespace Dalamud.Game.ClientState.Fates namespace Dalamud.Game.ClientState.Fates;
/// <summary>
/// This collection represents the currently available Fate events.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed partial class FateTable
{ {
/// <summary>
/// This collection represents the currently available Fate events.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed partial class FateTable
{
private readonly ClientStateAddressResolver address; private readonly ClientStateAddressResolver address;
/// <summary> /// <summary>
@ -123,13 +123,13 @@ namespace Dalamud.Game.ClientState.Fates
return new Fate(offset); return new Fate(offset);
} }
} }
/// <summary> /// <summary>
/// This collection represents the currently available Fate events. /// This collection represents the currently available Fate events.
/// </summary> /// </summary>
public sealed partial class FateTable : IReadOnlyCollection<Fate> public sealed partial class FateTable : IReadOnlyCollection<Fate>
{ {
/// <inheritdoc/> /// <inheritdoc/>
int IReadOnlyCollection<Fate>.Count => this.Length; int IReadOnlyCollection<Fate>.Count => this.Length;
@ -144,5 +144,4 @@ namespace Dalamud.Game.ClientState.Fates
/// <inheritdoc/> /// <inheritdoc/>
IEnumerator IEnumerable.GetEnumerator() => this.GetEnumerator(); IEnumerator IEnumerable.GetEnumerator() => this.GetEnumerator();
}
} }

View file

@ -1,13 +1,13 @@
using System; using System;
namespace Dalamud.Game.ClientState.GamePad namespace Dalamud.Game.ClientState.GamePad;
/// <summary>
/// Bitmask of the Button ushort used by the game.
/// </summary>
[Flags]
public enum GamepadButtons : ushort
{ {
/// <summary>
/// Bitmask of the Button ushort used by the game.
/// </summary>
[Flags]
public enum GamepadButtons : ushort
{
/// <summary> /// <summary>
/// No buttons pressed. /// No buttons pressed.
/// </summary> /// </summary>
@ -92,5 +92,4 @@ namespace Dalamud.Game.ClientState.GamePad
/// Button on the left inner side of the controller. ??? on PS, Back on Xbox. /// Button on the left inner side of the controller. ??? on PS, Back on Xbox.
/// </summary> /// </summary>
Select = 0x4000, Select = 0x4000,
}
} }

View file

@ -1,18 +1,18 @@
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Dalamud.Game.ClientState.GamePad namespace Dalamud.Game.ClientState.GamePad;
/// <summary>
/// Struct which gets populated by polling the gamepads.
///
/// Has an array of gamepads, among many other things (here not mapped).
/// All we really care about is the final data which the game uses to determine input.
///
/// The size is definitely bigger than only the following fields but I do not know how big.
/// </summary>
[StructLayout(LayoutKind.Explicit)]
public struct GamepadInput
{ {
/// <summary>
/// Struct which gets populated by polling the gamepads.
///
/// Has an array of gamepads, among many other things (here not mapped).
/// All we really care about is the final data which the game uses to determine input.
///
/// The size is definitely bigger than only the following fields but I do not know how big.
/// </summary>
[StructLayout(LayoutKind.Explicit)]
public struct GamepadInput
{
/// <summary> /// <summary>
/// Left analogue stick's horizontal value, -99 for left, 99 for right. /// Left analogue stick's horizontal value, -99 for left, 99 for right.
/// </summary> /// </summary>
@ -72,5 +72,4 @@ namespace Dalamud.Game.ClientState.GamePad
/// </remarks> /// </remarks>
[FieldOffset(0xA4)] [FieldOffset(0xA4)]
public ushort ButtonsRepeat; public ushort ButtonsRepeat;
}
} }

View file

@ -4,15 +4,15 @@ using Dalamud.Hooking;
using ImGuiNET; using ImGuiNET;
using Serilog; using Serilog;
namespace Dalamud.Game.ClientState.GamePad namespace Dalamud.Game.ClientState.GamePad;
/// <summary>
/// Exposes the game gamepad state to dalamud.
///
/// Will block game's gamepad input if <see cref="ImGuiConfigFlags.NavEnableGamepad"/> is set.
/// </summary>
public unsafe class GamepadState : IDisposable
{ {
/// <summary>
/// Exposes the game gamepad state to dalamud.
///
/// Will block game's gamepad input if <see cref="ImGuiConfigFlags.NavEnableGamepad"/> is set.
/// </summary>
public unsafe class GamepadState : IDisposable
{
private readonly Hook<ControllerPoll> gamepadPoll; private readonly Hook<ControllerPoll> gamepadPoll;
private bool isDisposed; private bool isDisposed;
@ -257,5 +257,4 @@ namespace Dalamud.Game.ClientState.GamePad
this.isDisposed = true; this.isDisposed = true;
} }
}
} }

View file

@ -1,10 +1,10 @@
namespace Dalamud.Game.ClientState.JobGauge.Enums namespace Dalamud.Game.ClientState.JobGauge.Enums;
/// <summary>
/// DRG Blood of the Dragon state types.
/// </summary>
public enum BOTDState : byte
{ {
/// <summary>
/// DRG Blood of the Dragon state types.
/// </summary>
public enum BOTDState : byte
{
/// <summary> /// <summary>
/// Inactive type. /// Inactive type.
/// </summary> /// </summary>
@ -19,5 +19,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Enums
/// Life of the Dragon is active. /// Life of the Dragon is active.
/// </summary> /// </summary>
LOTD = 2, LOTD = 2,
}
} }

View file

@ -1,10 +1,10 @@
namespace Dalamud.Game.ClientState.JobGauge.Enums namespace Dalamud.Game.ClientState.JobGauge.Enums;
/// <summary>
/// AST Arcanum (card) types.
/// </summary>
public enum CardType : byte
{ {
/// <summary>
/// AST Arcanum (card) types.
/// </summary>
public enum CardType : byte
{
/// <summary> /// <summary>
/// No card. /// No card.
/// </summary> /// </summary>
@ -49,5 +49,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Enums
/// The Lady of Crowns card. /// The Lady of Crowns card.
/// </summary> /// </summary>
LADY = 0x80, LADY = 0x80,
}
} }

View file

@ -1,10 +1,10 @@
namespace Dalamud.Game.ClientState.JobGauge.Enums namespace Dalamud.Game.ClientState.JobGauge.Enums;
/// <summary>
/// SCH Dismissed fairy types.
/// </summary>
public enum DismissedFairy : byte
{ {
/// <summary>
/// SCH Dismissed fairy types.
/// </summary>
public enum DismissedFairy : byte
{
/// <summary> /// <summary>
/// Dismissed fairy is Eos. /// Dismissed fairy is Eos.
/// </summary> /// </summary>
@ -14,5 +14,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Enums
/// Dismissed fairy is Selene. /// Dismissed fairy is Selene.
/// </summary> /// </summary>
SELENE = 7, SELENE = 7,
}
} }

View file

@ -1,10 +1,10 @@
namespace Dalamud.Game.ClientState.JobGauge.Enums namespace Dalamud.Game.ClientState.JobGauge.Enums;
/// <summary>
/// NIN Mudra types.
/// </summary>
public enum Mudras : byte
{ {
/// <summary>
/// NIN Mudra types.
/// </summary>
public enum Mudras : byte
{
/// <summary> /// <summary>
/// Ten mudra. /// Ten mudra.
/// </summary> /// </summary>
@ -19,5 +19,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Enums
/// Jin mudra. /// Jin mudra.
/// </summary> /// </summary>
JIN = 3, JIN = 3,
}
} }

View file

@ -1,10 +1,10 @@
namespace Dalamud.Game.ClientState.JobGauge.Enums namespace Dalamud.Game.ClientState.JobGauge.Enums;
/// <summary>
/// SMN summoned pet glam types.
/// </summary>
public enum PetGlam : byte
{ {
/// <summary>
/// SMN summoned pet glam types.
/// </summary>
public enum PetGlam : byte
{
/// <summary> /// <summary>
/// No pet glam. /// No pet glam.
/// </summary> /// </summary>
@ -24,5 +24,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Enums
/// Ruby carbuncle pet glam. /// Ruby carbuncle pet glam.
/// </summary> /// </summary>
RUBY = 3, RUBY = 3,
}
} }

View file

@ -1,10 +1,10 @@
namespace Dalamud.Game.ClientState.JobGauge.Enums namespace Dalamud.Game.ClientState.JobGauge.Enums;
/// <summary>
/// AST Divination seal types.
/// </summary>
public enum SealType : byte
{ {
/// <summary>
/// AST Divination seal types.
/// </summary>
public enum SealType : byte
{
/// <summary> /// <summary>
/// No seal. /// No seal.
/// </summary> /// </summary>
@ -24,5 +24,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Enums
/// Celestial seal. /// Celestial seal.
/// </summary> /// </summary>
CELESTIAL = 3, CELESTIAL = 3,
}
} }

View file

@ -1,13 +1,13 @@
using System; using System;
namespace Dalamud.Game.ClientState.JobGauge.Enums namespace Dalamud.Game.ClientState.JobGauge.Enums;
/// <summary>
/// Samurai Sen types.
/// </summary>
[Flags]
public enum Sen : byte
{ {
/// <summary>
/// Samurai Sen types.
/// </summary>
[Flags]
public enum Sen : byte
{
/// <summary> /// <summary>
/// No Sen. /// No Sen.
/// </summary> /// </summary>
@ -27,5 +27,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Enums
/// Ka Sen type. /// Ka Sen type.
/// </summary> /// </summary>
KA = 1 << 2, KA = 1 << 2,
}
} }

View file

@ -1,10 +1,10 @@
namespace Dalamud.Game.ClientState.JobGauge.Enums namespace Dalamud.Game.ClientState.JobGauge.Enums;
/// <summary>
/// BRD Song types.
/// </summary>
public enum Song : byte
{ {
/// <summary>
/// BRD Song types.
/// </summary>
public enum Song : byte
{
/// <summary> /// <summary>
/// No song is active type. /// No song is active type.
/// </summary> /// </summary>
@ -24,5 +24,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Enums
/// The Wanderer's Minuet type. /// The Wanderer's Minuet type.
/// </summary> /// </summary>
WANDERER = 15, WANDERER = 15,
}
} }

View file

@ -1,10 +1,10 @@
namespace Dalamud.Game.ClientState.JobGauge.Enums namespace Dalamud.Game.ClientState.JobGauge.Enums;
/// <summary>
/// SMN summoned pet types.
/// </summary>
public enum SummonPet : byte
{ {
/// <summary>
/// SMN summoned pet types.
/// </summary>
public enum SummonPet : byte
{
/// <summary> /// <summary>
/// No pet. /// No pet.
/// </summary> /// </summary>
@ -24,5 +24,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Enums
/// The summoned pet Garuda. /// The summoned pet Garuda.
/// </summary> /// </summary>
GARUDA = 5, GARUDA = 5,
}
} }

View file

@ -7,15 +7,15 @@ using Dalamud.IoC;
using Dalamud.IoC.Internal; using Dalamud.IoC.Internal;
using Serilog; using Serilog;
namespace Dalamud.Game.ClientState.JobGauge namespace Dalamud.Game.ClientState.JobGauge;
/// <summary>
/// This class converts in-memory Job gauge data to structs.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public class JobGauges
{ {
/// <summary>
/// This class converts in-memory Job gauge data to structs.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public class JobGauges
{
private Dictionary<Type, JobGaugeBase> cache = new(); private Dictionary<Type, JobGaugeBase> cache = new();
/// <summary> /// <summary>
@ -50,5 +50,4 @@ namespace Dalamud.Game.ClientState.JobGauge
return (T)gauge; return (T)gauge;
} }
}
} }

View file

@ -2,13 +2,13 @@ using System;
using Dalamud.Game.ClientState.JobGauge.Enums; using Dalamud.Game.ClientState.JobGauge.Enums;
namespace Dalamud.Game.ClientState.JobGauge.Types namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory AST job gauge.
/// </summary>
public unsafe class ASTGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.AstrologianGauge>
{ {
/// <summary>
/// In-memory AST job gauge.
/// </summary>
public unsafe class ASTGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.AstrologianGauge>
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ASTGauge"/> class. /// Initializes a new instance of the <see cref="ASTGauge"/> class.
/// </summary> /// </summary>
@ -36,5 +36,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Types
if (this.Struct->Seals[2] == (byte)seal) return true; if (this.Struct->Seals[2] == (byte)seal) return true;
return false; return false;
} }
}
} }

View file

@ -1,12 +1,12 @@
using System; using System;
namespace Dalamud.Game.ClientState.JobGauge.Types namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory BLM job gauge.
/// </summary>
public unsafe class BLMGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.BlackMageGauge>
{ {
/// <summary>
/// In-memory BLM job gauge.
/// </summary>
public unsafe class BLMGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.BlackMageGauge>
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="BLMGauge"/> class. /// Initializes a new instance of the <see cref="BLMGauge"/> class.
/// </summary> /// </summary>
@ -63,5 +63,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Types
/// </summary> /// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns> /// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsEnochianActive => this.Struct->Enochian != 0; public bool IsEnochianActive => this.Struct->Enochian != 0;
}
} }

View file

@ -2,13 +2,13 @@ using System;
using Dalamud.Game.ClientState.JobGauge.Enums; using Dalamud.Game.ClientState.JobGauge.Enums;
namespace Dalamud.Game.ClientState.JobGauge.Types namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory BRD job gauge.
/// </summary>
public unsafe class BRDGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.BardGauge>
{ {
/// <summary>
/// In-memory BRD job gauge.
/// </summary>
public unsafe class BRDGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.BardGauge>
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="BRDGauge"/> class. /// Initializes a new instance of the <see cref="BRDGauge"/> class.
/// </summary> /// </summary>
@ -37,5 +37,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Types
/// Gets the type of song that is active. /// Gets the type of song that is active.
/// </summary> /// </summary>
public Song Song => (Song)this.Struct->Song; public Song Song => (Song)this.Struct->Song;
}
} }

View file

@ -1,12 +1,12 @@
using System; using System;
namespace Dalamud.Game.ClientState.JobGauge.Types namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory DNC job gauge.
/// </summary>
public unsafe class DNCGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.DancerGauge>
{ {
/// <summary>
/// In-memory DNC job gauge.
/// </summary>
public unsafe class DNCGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.DancerGauge>
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="DNCGauge"/> class. /// Initializes a new instance of the <see cref="DNCGauge"/> class.
/// </summary> /// </summary>
@ -56,5 +56,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Types
/// </summary> /// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns> /// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsDancing => this.Struct->DanceSteps[0] != 0; public bool IsDancing => this.Struct->DanceSteps[0] != 0;
}
} }

View file

@ -2,13 +2,13 @@ using System;
using Dalamud.Game.ClientState.JobGauge.Enums; using Dalamud.Game.ClientState.JobGauge.Enums;
namespace Dalamud.Game.ClientState.JobGauge.Types namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory DRG job gauge.
/// </summary>
public unsafe class DRGGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.DragoonGauge>
{ {
/// <summary>
/// In-memory DRG job gauge.
/// </summary>
public unsafe class DRGGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.DragoonGauge>
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="DRGGauge"/> class. /// Initializes a new instance of the <see cref="DRGGauge"/> class.
/// </summary> /// </summary>
@ -32,5 +32,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Types
/// Gets the count of eyes opened during Blood of the Dragon. /// Gets the count of eyes opened during Blood of the Dragon.
/// </summary> /// </summary>
public byte EyeCount => this.Struct->EyeCount; public byte EyeCount => this.Struct->EyeCount;
}
} }

View file

@ -1,12 +1,12 @@
using System; using System;
namespace Dalamud.Game.ClientState.JobGauge.Types namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory DRK job gauge.
/// </summary>
public unsafe class DRKGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.DarkKnightGauge>
{ {
/// <summary>
/// In-memory DRK job gauge.
/// </summary>
public unsafe class DRKGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.DarkKnightGauge>
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="DRKGauge"/> class. /// Initializes a new instance of the <see cref="DRKGauge"/> class.
/// </summary> /// </summary>
@ -36,5 +36,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Types
/// </summary> /// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns> /// <returns><c>true</c> or <c>false</c>.</returns>
public bool HasDarkArts => this.Struct->DarkArtsState > 0; public bool HasDarkArts => this.Struct->DarkArtsState > 0;
}
} }

View file

@ -1,12 +1,12 @@
using System; using System;
namespace Dalamud.Game.ClientState.JobGauge.Types namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory GNB job gauge.
/// </summary>
public unsafe class GNBGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.GunbreakerGauge>
{ {
/// <summary>
/// In-memory GNB job gauge.
/// </summary>
public unsafe class GNBGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.GunbreakerGauge>
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="GNBGauge"/> class. /// Initializes a new instance of the <see cref="GNBGauge"/> class.
/// </summary> /// </summary>
@ -30,5 +30,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Types
/// Gets the current step of the Gnashing Fang combo. /// Gets the current step of the Gnashing Fang combo.
/// </summary> /// </summary>
public byte AmmoComboStep => this.Struct->AmmoComboStep; public byte AmmoComboStep => this.Struct->AmmoComboStep;
}
} }

View file

@ -1,12 +1,12 @@
using System; using System;
namespace Dalamud.Game.ClientState.JobGauge.Types namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// Base job gauge class.
/// </summary>
public abstract unsafe class JobGaugeBase
{ {
/// <summary>
/// Base job gauge class.
/// </summary>
public abstract unsafe class JobGaugeBase
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="JobGaugeBase"/> class. /// Initializes a new instance of the <see cref="JobGaugeBase"/> class.
/// </summary> /// </summary>
@ -20,5 +20,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Types
/// Gets the address of this job gauge in memory. /// Gets the address of this job gauge in memory.
/// </summary> /// </summary>
public IntPtr Address { get; } public IntPtr Address { get; }
}
} }

View file

@ -1,13 +1,13 @@
using System; using System;
namespace Dalamud.Game.ClientState.JobGauge.Types namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// Base job gauge class.
/// </summary>
/// <typeparam name="T">The underlying FFXIVClientStructs type.</typeparam>
public unsafe class JobGaugeBase<T> : JobGaugeBase where T : unmanaged
{ {
/// <summary>
/// Base job gauge class.
/// </summary>
/// <typeparam name="T">The underlying FFXIVClientStructs type.</typeparam>
public unsafe class JobGaugeBase<T> : JobGaugeBase where T : unmanaged
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="JobGaugeBase{T}"/> class. /// Initializes a new instance of the <see cref="JobGaugeBase{T}"/> class.
/// </summary> /// </summary>
@ -21,5 +21,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Types
/// Gets an unsafe struct pointer of this job gauge. /// Gets an unsafe struct pointer of this job gauge.
/// </summary> /// </summary>
private protected T* Struct => (T*)this.Address; private protected T* Struct => (T*)this.Address;
}
} }

View file

@ -1,12 +1,12 @@
using System; using System;
namespace Dalamud.Game.ClientState.JobGauge.Types namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory MCH job gauge.
/// </summary>
public unsafe class MCHGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.MachinistGauge>
{ {
/// <summary>
/// In-memory MCH job gauge.
/// </summary>
public unsafe class MCHGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.MachinistGauge>
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="MCHGauge"/> class. /// Initializes a new instance of the <see cref="MCHGauge"/> class.
/// </summary> /// </summary>
@ -52,5 +52,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Types
/// </summary> /// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns> /// <returns><c>true</c> or <c>false</c>.</returns>
public bool IsRobotActive => (this.Struct->TimerActive & 2) != 0; public bool IsRobotActive => (this.Struct->TimerActive & 2) != 0;
}
} }

View file

@ -1,12 +1,12 @@
using System; using System;
namespace Dalamud.Game.ClientState.JobGauge.Types namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory MNK job gauge.
/// </summary>
public unsafe class MNKGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.MonkGauge>
{ {
/// <summary>
/// In-memory MNK job gauge.
/// </summary>
public unsafe class MNKGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.MonkGauge>
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="MNKGauge"/> class. /// Initializes a new instance of the <see cref="MNKGauge"/> class.
/// </summary> /// </summary>
@ -20,5 +20,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Types
/// Gets the number of Chakra available. /// Gets the number of Chakra available.
/// </summary> /// </summary>
public byte Chakra => this.Struct->Chakra; public byte Chakra => this.Struct->Chakra;
}
} }

View file

@ -1,12 +1,12 @@
using System; using System;
namespace Dalamud.Game.ClientState.JobGauge.Types namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory NIN job gauge.
/// </summary>
public unsafe class NINGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.NinjaGauge>
{ {
/// <summary>
/// In-memory NIN job gauge.
/// </summary>
public unsafe class NINGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.NinjaGauge>
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="NINGauge"/> class. /// Initializes a new instance of the <see cref="NINGauge"/> class.
/// </summary> /// </summary>
@ -30,5 +30,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Types
/// Gets the number of times Huton has been cast manually. /// Gets the number of times Huton has been cast manually.
/// </summary> /// </summary>
public byte HutonManualCasts => this.Struct->HutonManualCasts; public byte HutonManualCasts => this.Struct->HutonManualCasts;
}
} }

View file

@ -1,12 +1,12 @@
using System; using System;
namespace Dalamud.Game.ClientState.JobGauge.Types namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory PLD job gauge.
/// </summary>
public unsafe class PLDGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.PaladinGauge>
{ {
/// <summary>
/// In-memory PLD job gauge.
/// </summary>
public unsafe class PLDGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.PaladinGauge>
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="PLDGauge"/> class. /// Initializes a new instance of the <see cref="PLDGauge"/> class.
/// </summary> /// </summary>
@ -20,5 +20,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Types
/// Gets the current level of the Oath gauge. /// Gets the current level of the Oath gauge.
/// </summary> /// </summary>
public byte OathGauge => this.Struct->OathGauge; public byte OathGauge => this.Struct->OathGauge;
}
} }

View file

@ -1,12 +1,12 @@
using System; using System;
namespace Dalamud.Game.ClientState.JobGauge.Types namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory RDM job gauge.
/// </summary>
public unsafe class RDMGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.RedMageGauge>
{ {
/// <summary>
/// In-memory RDM job gauge.
/// </summary>
public unsafe class RDMGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.RedMageGauge>
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="RDMGauge"/> class. /// Initializes a new instance of the <see cref="RDMGauge"/> class.
/// </summary> /// </summary>
@ -25,5 +25,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Types
/// Gets the level of the Black gauge. /// Gets the level of the Black gauge.
/// </summary> /// </summary>
public byte BlackMana => this.Struct->BlackMana; public byte BlackMana => this.Struct->BlackMana;
}
} }

View file

@ -2,13 +2,13 @@ using System;
using Dalamud.Game.ClientState.JobGauge.Enums; using Dalamud.Game.ClientState.JobGauge.Enums;
namespace Dalamud.Game.ClientState.JobGauge.Types namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory SAM job gauge.
/// </summary>
public unsafe class SAMGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.SamuraiGauge>
{ {
/// <summary>
/// In-memory SAM job gauge.
/// </summary>
public unsafe class SAMGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.SamuraiGauge>
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="SAMGauge"/> class. /// Initializes a new instance of the <see cref="SAMGauge"/> class.
/// </summary> /// </summary>
@ -50,5 +50,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Types
/// </summary> /// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns> /// <returns><c>true</c> or <c>false</c>.</returns>
public bool HasKa => (this.Sen & Sen.KA) != 0; public bool HasKa => (this.Sen & Sen.KA) != 0;
}
} }

View file

@ -2,13 +2,13 @@ using System;
using Dalamud.Game.ClientState.JobGauge.Enums; using Dalamud.Game.ClientState.JobGauge.Enums;
namespace Dalamud.Game.ClientState.JobGauge.Types namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory SCH job gauge.
/// </summary>
public unsafe class SCHGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.ScholarGauge>
{ {
/// <summary>
/// In-memory SCH job gauge.
/// </summary>
public unsafe class SCHGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.ScholarGauge>
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="SCHGauge"/> class. /// Initializes a new instance of the <see cref="SCHGauge"/> class.
/// </summary> /// </summary>
@ -37,5 +37,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Types
/// Gets the last dismissed fairy. /// Gets the last dismissed fairy.
/// </summary> /// </summary>
public DismissedFairy DismissedFairy => (DismissedFairy)this.Struct->DismissedFairy; public DismissedFairy DismissedFairy => (DismissedFairy)this.Struct->DismissedFairy;
}
} }

View file

@ -2,13 +2,13 @@ using System;
using Dalamud.Game.ClientState.JobGauge.Enums; using Dalamud.Game.ClientState.JobGauge.Enums;
namespace Dalamud.Game.ClientState.JobGauge.Types namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory SMN job gauge.
/// </summary>
public unsafe class SMNGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.SummonerGauge>
{ {
/// <summary>
/// In-memory SMN job gauge.
/// </summary>
public unsafe class SMNGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.SummonerGauge>
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="SMNGauge"/> class. /// Initializes a new instance of the <see cref="SMNGauge"/> class.
/// </summary> /// </summary>
@ -56,5 +56,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Types
/// </summary> /// </summary>
/// <returns><c>true</c> or <c>false</c>.</returns> /// <returns><c>true</c> or <c>false</c>.</returns>
public bool HasAetherflowStacks => (this.AetherFlags & 3) > 0; public bool HasAetherflowStacks => (this.AetherFlags & 3) > 0;
}
} }

View file

@ -1,12 +1,12 @@
using System; using System;
namespace Dalamud.Game.ClientState.JobGauge.Types namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory WAR job gauge.
/// </summary>
public unsafe class WARGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.WarriorGauge>
{ {
/// <summary>
/// In-memory WAR job gauge.
/// </summary>
public unsafe class WARGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.WarriorGauge>
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="WARGauge"/> class. /// Initializes a new instance of the <see cref="WARGauge"/> class.
/// </summary> /// </summary>
@ -20,5 +20,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Types
/// Gets the amount of wrath in the Beast gauge. /// Gets the amount of wrath in the Beast gauge.
/// </summary> /// </summary>
public byte BeastGauge => this.Struct->BeastGauge; public byte BeastGauge => this.Struct->BeastGauge;
}
} }

View file

@ -1,12 +1,12 @@
using System; using System;
namespace Dalamud.Game.ClientState.JobGauge.Types namespace Dalamud.Game.ClientState.JobGauge.Types;
/// <summary>
/// In-memory WHM job gauge.
/// </summary>
public unsafe class WHMGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.WhiteMageGauge>
{ {
/// <summary>
/// In-memory WHM job gauge.
/// </summary>
public unsafe class WHMGauge : JobGaugeBase<FFXIVClientStructs.FFXIV.Client.Game.Gauge.WhiteMageGauge>
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="WHMGauge"/> class. /// Initializes a new instance of the <see cref="WHMGauge"/> class.
/// </summary> /// </summary>
@ -30,5 +30,4 @@ namespace Dalamud.Game.ClientState.JobGauge.Types
/// Gets the number of times the blood lily has been nourished. /// Gets the number of times the blood lily has been nourished.
/// </summary> /// </summary>
public byte BloodLily => this.Struct->BloodLily; public byte BloodLily => this.Struct->BloodLily;
}
} }

View file

@ -6,24 +6,24 @@ using Dalamud.IoC;
using Dalamud.IoC.Internal; using Dalamud.IoC.Internal;
using Serilog; using Serilog;
namespace Dalamud.Game.ClientState.Keys namespace Dalamud.Game.ClientState.Keys;
/// <summary>
/// Wrapper around the game keystate buffer, which contains the pressed state for all keyboard keys, indexed by virtual vkCode.
/// </summary>
/// <remarks>
/// The stored key state is actually a combination field, however the below ephemeral states are consumed each frame. Setting
/// the value may be mildly useful, however retrieving the value is largely pointless. In testing, it wasn't possible without
/// setting the statue manually.
/// index &amp; 0 = key pressed.
/// index &amp; 1 = key down (ephemeral).
/// index &amp; 2 = key up (ephemeral).
/// index &amp; 3 = short key press (ephemeral).
/// </remarks>
[PluginInterface]
[InterfaceVersion("1.0")]
public class KeyState
{ {
/// <summary>
/// Wrapper around the game keystate buffer, which contains the pressed state for all keyboard keys, indexed by virtual vkCode.
/// </summary>
/// <remarks>
/// The stored key state is actually a combination field, however the below ephemeral states are consumed each frame. Setting
/// the value may be mildly useful, however retrieving the value is largely pointless. In testing, it wasn't possible without
/// setting the statue manually.
/// index &amp; 0 = key pressed.
/// index &amp; 1 = key down (ephemeral).
/// index &amp; 2 = key up (ephemeral).
/// index &amp; 3 = short key press (ephemeral).
/// </remarks>
[PluginInterface]
[InterfaceVersion("1.0")]
public class KeyState
{
// The array is accessed in a way that this limit doesn't appear to exist // The array is accessed in a way that this limit doesn't appear to exist
// but there is other state data past this point, and keys beyond here aren't // but there is other state data past this point, and keys beyond here aren't
// generally valid for most things anyway // generally valid for most things anyway
@ -156,5 +156,4 @@ namespace Dalamud.Game.ClientState.Keys
return ref *(int*)(this.bufferBase + (4 * vkCode)); return ref *(int*)(this.bufferBase + (4 * vkCode));
} }
}
} }

View file

@ -1,13 +1,13 @@
namespace Dalamud.Game.ClientState.Keys namespace Dalamud.Game.ClientState.Keys;
/// <summary>
/// Virtual-key codes.
/// </summary>
/// <remarks>
/// Defined in winuser.h from Windows SDK v6.1.
/// </remarks>
public enum VirtualKey : ushort
{ {
/// <summary>
/// Virtual-key codes.
/// </summary>
/// <remarks>
/// Defined in winuser.h from Windows SDK v6.1.
/// </remarks>
public enum VirtualKey : ushort
{
/// <summary> /// <summary>
/// This is an addendum to use on functions in which you have to pass a zero value to represent no key code. /// This is an addendum to use on functions in which you have to pass a zero value to represent no key code.
/// </summary> /// </summary>
@ -1040,5 +1040,4 @@ namespace Dalamud.Game.ClientState.Keys
/// Clear key. /// Clear key.
/// </summary> /// </summary>
OEM_CLEAR = 254, OEM_CLEAR = 254,
}
} }

View file

@ -1,10 +1,10 @@
namespace Dalamud.Game.ClientState.Objects.Enums namespace Dalamud.Game.ClientState.Objects.Enums;
/// <summary>
/// An Enum describing possible BattleNpc kinds.
/// </summary>
public enum BattleNpcSubKind : byte
{ {
/// <summary>
/// An Enum describing possible BattleNpc kinds.
/// </summary>
public enum BattleNpcSubKind : byte
{
/// <summary> /// <summary>
/// Invalid BattleNpc. /// Invalid BattleNpc.
/// </summary> /// </summary>
@ -24,5 +24,4 @@ namespace Dalamud.Game.ClientState.Objects.Enums
/// BattleNpc representing a standard enemy. /// BattleNpc representing a standard enemy.
/// </summary> /// </summary>
Enemy = 5, Enemy = 5,
}
} }

View file

@ -1,11 +1,11 @@
namespace Dalamud.Game.ClientState.Objects.Enums namespace Dalamud.Game.ClientState.Objects.Enums;
/// <summary>
/// This enum describes the indices of the Customize array.
/// </summary>
// TODO: This may need some rework since it may not be entirely accurate (stolen from Sapphire)
public enum CustomizeIndex
{ {
/// <summary>
/// This enum describes the indices of the Customize array.
/// </summary>
// TODO: This may need some rework since it may not be entirely accurate (stolen from Sapphire)
public enum CustomizeIndex
{
/// <summary> /// <summary>
/// The race of the character. /// The race of the character.
/// </summary> /// </summary>
@ -135,5 +135,4 @@ namespace Dalamud.Game.ClientState.Objects.Enums
/// The face paint color of the character. /// The face paint color of the character.
/// </summary> /// </summary>
FacepaintColor = 0x19, FacepaintColor = 0x19,
}
} }

View file

@ -1,10 +1,10 @@
namespace Dalamud.Game.ClientState.Objects.Enums namespace Dalamud.Game.ClientState.Objects.Enums;
/// <summary>
/// Enum describing possible entity kinds.
/// </summary>
public enum ObjectKind : byte
{ {
/// <summary>
/// Enum describing possible entity kinds.
/// </summary>
public enum ObjectKind : byte
{
/// <summary> /// <summary>
/// Invalid character. /// Invalid character.
/// </summary> /// </summary>
@ -79,5 +79,4 @@ namespace Dalamud.Game.ClientState.Objects.Enums
/// Objects representing card stand objects. /// Objects representing card stand objects.
/// </summary> /// </summary>
CardStand = 0x0E, CardStand = 0x0E,
}
} }

View file

@ -1,13 +1,13 @@
using System; using System;
namespace Dalamud.Game.ClientState.Objects.Enums namespace Dalamud.Game.ClientState.Objects.Enums;
/// <summary>
/// Enum describing possible status flags.
/// </summary>
[Flags]
public enum StatusFlags : byte
{ {
/// <summary>
/// Enum describing possible status flags.
/// </summary>
[Flags]
public enum StatusFlags : byte
{
/// <summary> /// <summary>
/// No status flags set. /// No status flags set.
/// </summary> /// </summary>
@ -52,5 +52,4 @@ namespace Dalamud.Game.ClientState.Objects.Enums
/// Character is casting. /// Character is casting.
/// </summary> /// </summary>
IsCasting = 128, IsCasting = 128,
}
} }

View file

@ -9,15 +9,15 @@ using Dalamud.IoC;
using Dalamud.IoC.Internal; using Dalamud.IoC.Internal;
using Serilog; using Serilog;
namespace Dalamud.Game.ClientState.Objects namespace Dalamud.Game.ClientState.Objects;
/// <summary>
/// This collection represents the currently spawned FFXIV game objects.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed partial class ObjectTable
{ {
/// <summary>
/// This collection represents the currently spawned FFXIV game objects.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed partial class ObjectTable
{
private const int ObjectTableLength = 424; private const int ObjectTableLength = 424;
private readonly ClientStateAddressResolver address; private readonly ClientStateAddressResolver address;
@ -118,13 +118,13 @@ namespace Dalamud.Game.ClientState.Objects
_ => new GameObject(address), _ => new GameObject(address),
}; };
} }
} }
/// <summary> /// <summary>
/// This collection represents the currently spawned FFXIV game objects. /// This collection represents the currently spawned FFXIV game objects.
/// </summary> /// </summary>
public sealed partial class ObjectTable : IReadOnlyCollection<GameObject> public sealed partial class ObjectTable : IReadOnlyCollection<GameObject>
{ {
/// <inheritdoc/> /// <inheritdoc/>
int IReadOnlyCollection<GameObject>.Count => this.Length; int IReadOnlyCollection<GameObject>.Count => this.Length;
@ -144,5 +144,4 @@ namespace Dalamud.Game.ClientState.Objects
/// <inheritdoc/> /// <inheritdoc/>
IEnumerator IEnumerable.GetEnumerator() => this.GetEnumerator(); IEnumerator IEnumerable.GetEnumerator() => this.GetEnumerator();
}
} }

View file

@ -2,13 +2,13 @@ using System;
using Dalamud.Game.ClientState.Objects.Enums; using Dalamud.Game.ClientState.Objects.Enums;
namespace Dalamud.Game.ClientState.Objects.Types namespace Dalamud.Game.ClientState.Objects.Types;
/// <summary>
/// This class represents a battle NPC.
/// </summary>
public unsafe class BattleNpc : BattleChara
{ {
/// <summary>
/// This class represents a battle NPC.
/// </summary>
public unsafe class BattleNpc : BattleChara
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="BattleNpc"/> class. /// Initializes a new instance of the <see cref="BattleNpc"/> class.
/// Set up a new BattleNpc with the provided memory representation. /// Set up a new BattleNpc with the provided memory representation.
@ -26,5 +26,4 @@ namespace Dalamud.Game.ClientState.Objects.Types
/// <inheritdoc/> /// <inheritdoc/>
public override uint TargetObjectId => this.Struct->Character.TargetObjectID; public override uint TargetObjectId => this.Struct->Character.TargetObjectID;
}
} }

View file

@ -2,13 +2,13 @@ using System;
using Dalamud.Game.ClientState.Objects.Types; using Dalamud.Game.ClientState.Objects.Types;
namespace Dalamud.Game.ClientState.Objects.SubKinds namespace Dalamud.Game.ClientState.Objects.SubKinds;
/// <summary>
/// This class represents an EventObj.
/// </summary>
public unsafe class EventObj : GameObject
{ {
/// <summary>
/// This class represents an EventObj.
/// </summary>
public unsafe class EventObj : GameObject
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="EventObj"/> class. /// Initializes a new instance of the <see cref="EventObj"/> class.
/// Set up a new EventObj with the provided memory representation. /// Set up a new EventObj with the provided memory representation.
@ -18,5 +18,4 @@ namespace Dalamud.Game.ClientState.Objects.SubKinds
: base(address) : base(address)
{ {
} }
}
} }

View file

@ -2,13 +2,13 @@ using System;
using Dalamud.Game.ClientState.Objects.Types; using Dalamud.Game.ClientState.Objects.Types;
namespace Dalamud.Game.ClientState.Objects.SubKinds namespace Dalamud.Game.ClientState.Objects.SubKinds;
/// <summary>
/// This class represents a NPC.
/// </summary>
public unsafe class Npc : Character
{ {
/// <summary>
/// This class represents a NPC.
/// </summary>
public unsafe class Npc : Character
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Npc"/> class. /// Initializes a new instance of the <see cref="Npc"/> class.
/// Set up a new NPC with the provided memory representation. /// Set up a new NPC with the provided memory representation.
@ -18,5 +18,4 @@ namespace Dalamud.Game.ClientState.Objects.SubKinds
: base(address) : base(address)
{ {
} }
}
} }

View file

@ -3,13 +3,13 @@ using System;
using Dalamud.Game.ClientState.Objects.Types; using Dalamud.Game.ClientState.Objects.Types;
using Dalamud.Game.ClientState.Resolvers; using Dalamud.Game.ClientState.Resolvers;
namespace Dalamud.Game.ClientState.Objects.SubKinds namespace Dalamud.Game.ClientState.Objects.SubKinds;
/// <summary>
/// This class represents a player character.
/// </summary>
public unsafe class PlayerCharacter : BattleChara
{ {
/// <summary>
/// This class represents a player character.
/// </summary>
public unsafe class PlayerCharacter : BattleChara
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="PlayerCharacter"/> class. /// Initializes a new instance of the <see cref="PlayerCharacter"/> class.
/// This represents a player character. /// This represents a player character.
@ -34,5 +34,4 @@ namespace Dalamud.Game.ClientState.Objects.SubKinds
/// Gets the target actor ID of the PlayerCharacter. /// Gets the target actor ID of the PlayerCharacter.
/// </summary> /// </summary>
public override uint TargetObjectId => this.Struct->Character.PlayerTargetObjectID; public override uint TargetObjectId => this.Struct->Character.PlayerTargetObjectID;
}
} }

View file

@ -4,15 +4,15 @@ using Dalamud.Game.ClientState.Objects.Types;
using Dalamud.IoC; using Dalamud.IoC;
using Dalamud.IoC.Internal; using Dalamud.IoC.Internal;
namespace Dalamud.Game.ClientState.Objects namespace Dalamud.Game.ClientState.Objects;
/// <summary>
/// Get and set various kinds of targets for the player.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed unsafe class TargetManager
{ {
/// <summary>
/// Get and set various kinds of targets for the player.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed unsafe class TargetManager
{
private readonly ClientStateAddressResolver address; private readonly ClientStateAddressResolver address;
/// <summary> /// <summary>
@ -160,5 +160,4 @@ namespace Dalamud.Game.ClientState.Objects
/// Clears the soft target. /// Clears the soft target.
/// </summary> /// </summary>
public void ClearSoftTarget() => this.SetSoftTarget(IntPtr.Zero); public void ClearSoftTarget() => this.SetSoftTarget(IntPtr.Zero);
}
} }

View file

@ -2,13 +2,13 @@ using System;
using Dalamud.Game.ClientState.Statuses; using Dalamud.Game.ClientState.Statuses;
namespace Dalamud.Game.ClientState.Objects.Types namespace Dalamud.Game.ClientState.Objects.Types;
/// <summary>
/// This class represents the battle characters.
/// </summary>
public unsafe class BattleChara : Character
{ {
/// <summary>
/// This class represents the battle characters.
/// </summary>
public unsafe class BattleChara : Character
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="BattleChara"/> class. /// Initializes a new instance of the <see cref="BattleChara"/> class.
/// This represents a battle character. /// This represents a battle character.
@ -63,5 +63,4 @@ namespace Dalamud.Game.ClientState.Objects.Types
/// Gets the underlying structure. /// Gets the underlying structure.
/// </summary> /// </summary>
private protected new FFXIVClientStructs.FFXIV.Client.Game.Character.BattleChara* Struct => (FFXIVClientStructs.FFXIV.Client.Game.Character.BattleChara*)this.Address; private protected new FFXIVClientStructs.FFXIV.Client.Game.Character.BattleChara* Struct => (FFXIVClientStructs.FFXIV.Client.Game.Character.BattleChara*)this.Address;
}
} }

View file

@ -5,13 +5,13 @@ using Dalamud.Game.ClientState.Resolvers;
using Dalamud.Game.Text.SeStringHandling; using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Memory; using Dalamud.Memory;
namespace Dalamud.Game.ClientState.Objects.Types namespace Dalamud.Game.ClientState.Objects.Types;
/// <summary>
/// This class represents the base for non-static entities.
/// </summary>
public unsafe class Character : GameObject
{ {
/// <summary>
/// This class represents the base for non-static entities.
/// </summary>
public unsafe class Character : GameObject
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Character"/> class. /// Initializes a new instance of the <see cref="Character"/> class.
/// This represents a non-static entity. /// This represents a non-static entity.
@ -102,5 +102,4 @@ namespace Dalamud.Game.ClientState.Objects.Types
/// Gets the underlying structure. /// Gets the underlying structure.
/// </summary> /// </summary>
private protected new FFXIVClientStructs.FFXIV.Client.Game.Character.Character* Struct => (FFXIVClientStructs.FFXIV.Client.Game.Character.Character*)this.Address; private protected new FFXIVClientStructs.FFXIV.Client.Game.Character.Character* Struct => (FFXIVClientStructs.FFXIV.Client.Game.Character.Character*)this.Address;
}
} }

View file

@ -5,13 +5,13 @@ using Dalamud.Game.ClientState.Objects.Enums;
using Dalamud.Game.Text.SeStringHandling; using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Memory; using Dalamud.Memory;
namespace Dalamud.Game.ClientState.Objects.Types namespace Dalamud.Game.ClientState.Objects.Types;
/// <summary>
/// This class represents a GameObject in FFXIV.
/// </summary>
public unsafe partial class GameObject : IEquatable<GameObject>
{ {
/// <summary>
/// This class represents a GameObject in FFXIV.
/// </summary>
public unsafe partial class GameObject : IEquatable<GameObject>
{
/// <summary> /// <summary>
/// IDs of non-networked GameObjects. /// IDs of non-networked GameObjects.
/// </summary> /// </summary>
@ -86,13 +86,13 @@ namespace Dalamud.Game.ClientState.Objects.Types
/// <inheritdoc/> /// <inheritdoc/>
public override int GetHashCode() => this.ObjectId.GetHashCode(); public override int GetHashCode() => this.ObjectId.GetHashCode();
} }
/// <summary> /// <summary>
/// This class represents a basic actor (GameObject) in FFXIV. /// This class represents a basic actor (GameObject) in FFXIV.
/// </summary> /// </summary>
public unsafe partial class GameObject public unsafe partial class GameObject
{ {
/// <summary> /// <summary>
/// Gets the name of this <see cref="GameObject" />. /// Gets the name of this <see cref="GameObject" />.
/// </summary> /// </summary>
@ -171,5 +171,4 @@ namespace Dalamud.Game.ClientState.Objects.Types
/// <inheritdoc/> /// <inheritdoc/>
public override string ToString() => $"{this.ObjectId:X}({this.Name.TextValue} - {this.ObjectKind}) at {this.Address:X}"; public override string ToString() => $"{this.ObjectId:X}({this.Name.TextValue} - {this.ObjectKind}) at {this.Address:X}";
}
} }

View file

@ -7,15 +7,15 @@ using Dalamud.IoC;
using Dalamud.IoC.Internal; using Dalamud.IoC.Internal;
using Serilog; using Serilog;
namespace Dalamud.Game.ClientState.Party namespace Dalamud.Game.ClientState.Party;
/// <summary>
/// This collection represents the actors present in your party or alliance.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed unsafe partial class PartyList
{ {
/// <summary>
/// This collection represents the actors present in your party or alliance.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed unsafe partial class PartyList
{
private const int GroupLength = 8; private const int GroupLength = 8;
private const int AllianceLength = 20; private const int AllianceLength = 20;
@ -153,13 +153,13 @@ namespace Dalamud.Game.ClientState.Party
return new PartyMember(address); return new PartyMember(address);
} }
} }
/// <summary> /// <summary>
/// This collection represents the party members present in your party or alliance. /// This collection represents the party members present in your party or alliance.
/// </summary> /// </summary>
public sealed partial class PartyList : IReadOnlyCollection<PartyMember> public sealed partial class PartyList : IReadOnlyCollection<PartyMember>
{ {
/// <inheritdoc/> /// <inheritdoc/>
int IReadOnlyCollection<PartyMember>.Count => this.Length; int IReadOnlyCollection<PartyMember>.Count => this.Length;
@ -180,5 +180,4 @@ namespace Dalamud.Game.ClientState.Party
/// <inheritdoc/> /// <inheritdoc/>
IEnumerator IEnumerable.GetEnumerator() => this.GetEnumerator(); IEnumerator IEnumerable.GetEnumerator() => this.GetEnumerator();
}
} }

View file

@ -9,13 +9,13 @@ using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Memory; using Dalamud.Memory;
using JetBrains.Annotations; using JetBrains.Annotations;
namespace Dalamud.Game.ClientState.Party namespace Dalamud.Game.ClientState.Party;
/// <summary>
/// This class represents a party member in the group manager.
/// </summary>
public unsafe class PartyMember
{ {
/// <summary>
/// This class represents a party member in the group manager.
/// </summary>
public unsafe class PartyMember
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="PartyMember"/> class. /// Initializes a new instance of the <see cref="PartyMember"/> class.
/// </summary> /// </summary>
@ -109,5 +109,4 @@ namespace Dalamud.Game.ClientState.Party
public byte Level => this.Struct->Level; public byte Level => this.Struct->Level;
private FFXIVClientStructs.FFXIV.Client.Game.Group.PartyMember* Struct => (FFXIVClientStructs.FFXIV.Client.Game.Group.PartyMember*)this.Address; private FFXIVClientStructs.FFXIV.Client.Game.Group.PartyMember* Struct => (FFXIVClientStructs.FFXIV.Client.Game.Group.PartyMember*)this.Address;
}
} }

View file

@ -1,14 +1,14 @@
using Dalamud.Data; using Dalamud.Data;
using Lumina.Excel; using Lumina.Excel;
namespace Dalamud.Game.ClientState.Resolvers namespace Dalamud.Game.ClientState.Resolvers;
/// <summary>
/// This object resolves a rowID within an Excel sheet.
/// </summary>
/// <typeparam name="T">The type of Lumina sheet to resolve.</typeparam>
public class ExcelResolver<T> where T : ExcelRow
{ {
/// <summary>
/// This object resolves a rowID within an Excel sheet.
/// </summary>
/// <typeparam name="T">The type of Lumina sheet to resolve.</typeparam>
public class ExcelResolver<T> where T : ExcelRow
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ExcelResolver{T}"/> class. /// Initializes a new instance of the <see cref="ExcelResolver{T}"/> class.
/// </summary> /// </summary>
@ -27,5 +27,4 @@ namespace Dalamud.Game.ClientState.Resolvers
/// Gets GameData linked to this excel row. /// Gets GameData linked to this excel row.
/// </summary> /// </summary>
public T GameData => Service<DataManager>.Get().GetExcelSheet<T>().GetRow(this.Id); public T GameData => Service<DataManager>.Get().GetExcelSheet<T>().GetRow(this.Id);
}
} }

View file

@ -4,13 +4,13 @@ using Dalamud.Game.ClientState.Objects;
using Dalamud.Game.ClientState.Objects.Types; using Dalamud.Game.ClientState.Objects.Types;
using Dalamud.Game.ClientState.Resolvers; using Dalamud.Game.ClientState.Resolvers;
namespace Dalamud.Game.ClientState.Statuses namespace Dalamud.Game.ClientState.Statuses;
/// <summary>
/// This class represents a status effect an actor is afflicted by.
/// </summary>
public unsafe class Status
{ {
/// <summary>
/// This class represents a status effect an actor is afflicted by.
/// </summary>
public unsafe class Status
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Status"/> class. /// Initializes a new instance of the <see cref="Status"/> class.
/// </summary> /// </summary>
@ -64,5 +64,4 @@ namespace Dalamud.Game.ClientState.Statuses
public GameObject? SourceObject => Service<ObjectTable>.Get().SearchById(this.SourceID); public GameObject? SourceObject => Service<ObjectTable>.Get().SearchById(this.SourceID);
private FFXIVClientStructs.FFXIV.Client.Game.Status* Struct => (FFXIVClientStructs.FFXIV.Client.Game.Status*)this.Address; private FFXIVClientStructs.FFXIV.Client.Game.Status* Struct => (FFXIVClientStructs.FFXIV.Client.Game.Status*)this.Address;
}
} }

View file

@ -3,13 +3,13 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Dalamud.Game.ClientState.Statuses namespace Dalamud.Game.ClientState.Statuses;
/// <summary>
/// This collection represents the status effects an actor is afflicted by.
/// </summary>
public sealed unsafe partial class StatusList
{ {
/// <summary>
/// This collection represents the status effects an actor is afflicted by.
/// </summary>
public sealed unsafe partial class StatusList
{
private const int StatusListLength = 30; private const int StatusListLength = 30;
/// <summary> /// <summary>
@ -112,13 +112,13 @@ namespace Dalamud.Game.ClientState.Statuses
return (IntPtr)(this.Struct->Status + (index * StatusSize)); return (IntPtr)(this.Struct->Status + (index * StatusSize));
} }
} }
/// <summary> /// <summary>
/// This collection represents the status effects an actor is afflicted by. /// This collection represents the status effects an actor is afflicted by.
/// </summary> /// </summary>
public sealed partial class StatusList : IReadOnlyCollection<Status>, ICollection public sealed partial class StatusList : IReadOnlyCollection<Status>, ICollection
{ {
/// <inheritdoc/> /// <inheritdoc/>
int IReadOnlyCollection<Status>.Count => this.Length; int IReadOnlyCollection<Status>.Count => this.Length;
@ -157,5 +157,4 @@ namespace Dalamud.Game.ClientState.Statuses
index++; index++;
} }
} }
}
} }

View file

@ -1,13 +1,13 @@
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Dalamud.Game.ClientState.Structs namespace Dalamud.Game.ClientState.Structs;
/// <summary>
/// Native memory representation of a FFXIV status effect.
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public struct StatusEffect
{ {
/// <summary>
/// Native memory representation of a FFXIV status effect.
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public struct StatusEffect
{
/// <summary> /// <summary>
/// The effect ID. /// The effect ID.
/// </summary> /// </summary>
@ -32,5 +32,4 @@ namespace Dalamud.Game.ClientState.Structs
/// The ID of the actor that caused this effect. /// The ID of the actor that caused this effect.
/// </summary> /// </summary>
public int OwnerId; public int OwnerId;
}
} }

View file

@ -1,12 +1,12 @@
using System.Reflection; using System.Reflection;
namespace Dalamud.Game.Command namespace Dalamud.Game.Command;
/// <summary>
/// This class describes a registered command.
/// </summary>
public sealed class CommandInfo
{ {
/// <summary>
/// This class describes a registered command.
/// </summary>
public sealed class CommandInfo
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="CommandInfo"/> class. /// Initializes a new instance of the <see cref="CommandInfo"/> class.
/// Create a new CommandInfo with the provided handler. /// Create a new CommandInfo with the provided handler.
@ -44,5 +44,4 @@ namespace Dalamud.Game.Command
/// Gets or sets the name of the assembly responsible for this command. /// Gets or sets the name of the assembly responsible for this command.
/// </summary> /// </summary>
internal string LoaderAssemblyName { get; set; } = string.Empty; internal string LoaderAssemblyName { get; set; } = string.Empty;
}
} }

View file

@ -10,15 +10,15 @@ using Dalamud.IoC;
using Dalamud.IoC.Internal; using Dalamud.IoC.Internal;
using Serilog; using Serilog;
namespace Dalamud.Game.Command namespace Dalamud.Game.Command;
/// <summary>
/// This class manages registered in-game slash commands.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed class CommandManager
{ {
/// <summary>
/// This class manages registered in-game slash commands.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed class CommandManager
{
private readonly Dictionary<string, CommandInfo> commandMap = new(); private readonly Dictionary<string, CommandInfo> commandMap = new();
private readonly Regex commandRegexEn = new(@"^The command (?<command>.+) does not exist\.$", RegexOptions.Compiled); private readonly Regex commandRegexEn = new(@"^The command (?<command>.+) does not exist\.$", RegexOptions.Compiled);
private readonly Regex commandRegexJp = new(@"^そのコマンドはありません。: (?<command>.+)$", RegexOptions.Compiled); private readonly Regex commandRegexJp = new(@"^そのコマンドはありません。: (?<command>.+)$", RegexOptions.Compiled);
@ -173,5 +173,4 @@ namespace Dalamud.Game.Command
} }
} }
} }
}
} }

View file

@ -16,15 +16,15 @@ using Dalamud.IoC.Internal;
using Dalamud.Utility; using Dalamud.Utility;
using Serilog; using Serilog;
namespace Dalamud.Game namespace Dalamud.Game;
/// <summary>
/// This class represents the Framework of the native game client and grants access to various subsystems.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed class Framework : IDisposable
{ {
/// <summary>
/// This class represents the Framework of the native game client and grants access to various subsystems.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed class Framework : IDisposable
{
private static Stopwatch statsStopwatch = new(); private static Stopwatch statsStopwatch = new();
private Stopwatch updateStopwatch = new(); private Stopwatch updateStopwatch = new();
@ -312,5 +312,4 @@ namespace Dalamud.Game
// Return the original trampoline location to cleanly exit // Return the original trampoline location to cleanly exit
return originalPtr; return originalPtr;
} }
}
} }

View file

@ -1,15 +1,13 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using Dalamud.Game.Internal; namespace Dalamud.Game;
namespace Dalamud.Game /// <summary>
/// The address resolver for the <see cref="Framework"/> class.
/// </summary>
public sealed class FrameworkAddressResolver : BaseAddressResolver
{ {
/// <summary>
/// The address resolver for the <see cref="Framework"/> class.
/// </summary>
public sealed class FrameworkAddressResolver : BaseAddressResolver
{
/// <summary> /// <summary>
/// Gets the base address native Framework class. /// Gets the base address native Framework class.
/// </summary> /// </summary>
@ -53,5 +51,4 @@ namespace Dalamud.Game
// Framework does not change once initialized in startup so don't bother to deref again and again. // Framework does not change once initialized in startup so don't bother to deref again and again.
this.BaseAddress = Marshal.ReadIntPtr(pFramework); this.BaseAddress = Marshal.ReadIntPtr(pFramework);
} }
}
} }

View file

@ -5,20 +5,20 @@ using System.Text;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace Dalamud.Game namespace Dalamud.Game;
/// <summary>
/// A GameVersion object contains give hierarchical numeric components: year, month,
/// day, major and minor. All components may be unspecified, which is represented
/// internally as a -1. By definition, an unspecified component matches anything
/// (both unspecified and specified), and an unspecified component is "less than" any
/// specified component. It will also equal the string "any" if all components are
/// unspecified. The value can be retrieved from the ffxivgame.ver file in your game
/// installation directory.
/// </summary>
[Serializable]
public sealed class GameVersion : ICloneable, IComparable, IComparable<GameVersion>, IEquatable<GameVersion>
{ {
/// <summary>
/// A GameVersion object contains give hierarchical numeric components: year, month,
/// day, major and minor. All components may be unspecified, which is represented
/// internally as a -1. By definition, an unspecified component matches anything
/// (both unspecified and specified), and an unspecified component is "less than" any
/// specified component. It will also equal the string "any" if all components are
/// unspecified. The value can be retrieved from the ffxivgame.ver file in your game
/// installation directory.
/// </summary>
[Serializable]
public sealed class GameVersion : ICloneable, IComparable, IComparable<GameVersion>, IEquatable<GameVersion>
{
private static readonly GameVersion AnyVersion = new(); private static readonly GameVersion AnyVersion = new();
/// <summary> /// <summary>
@ -405,5 +405,4 @@ namespace Dalamud.Game
.Append(string.Format("{0:D4}", this.Minor == -1 ? 0 : this.Minor)) .Append(string.Format("{0:D4}", this.Minor == -1 ? 0 : this.Minor))
.ToString(); .ToString();
} }
}
} }

View file

@ -2,13 +2,13 @@ using System;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace Dalamud.Game namespace Dalamud.Game;
/// <summary>
/// Converts a <see cref="GameVersion"/> to and from a string (e.g. <c>"2010.01.01.1234.5678"</c>).
/// </summary>
public sealed class GameVersionConverter : JsonConverter
{ {
/// <summary>
/// Converts a <see cref="GameVersion"/> to and from a string (e.g. <c>"2010.01.01.1234.5678"</c>).
/// </summary>
public sealed class GameVersionConverter : JsonConverter
{
/// <summary> /// <summary>
/// Writes the JSON representation of the object. /// Writes the JSON representation of the object.
/// </summary> /// </summary>
@ -76,5 +76,4 @@ namespace Dalamud.Game
{ {
return objectType == typeof(GameVersion); return objectType == typeof(GameVersion);
} }
}
} }

View file

@ -13,15 +13,15 @@ using Dalamud.IoC;
using Dalamud.IoC.Internal; using Dalamud.IoC.Internal;
using Serilog; using Serilog;
namespace Dalamud.Game.Gui namespace Dalamud.Game.Gui;
/// <summary>
/// This class handles interacting with the native chat UI.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed class ChatGui : IDisposable
{ {
/// <summary>
/// This class handles interacting with the native chat UI.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed class ChatGui : IDisposable
{
private readonly ChatGuiAddressResolver address; private readonly ChatGuiAddressResolver address;
private readonly Queue<XivChatEntry> chatQueue = new(); private readonly Queue<XivChatEntry> chatQueue = new();
@ -479,5 +479,4 @@ namespace Dalamud.Game.Gui
Log.Error(ex, "Exception on InteractableLinkClicked hook"); Log.Error(ex, "Exception on InteractableLinkClicked hook");
} }
} }
}
} }

View file

@ -1,14 +1,12 @@
using System; using System;
using Dalamud.Game.Internal; namespace Dalamud.Game.Gui;
namespace Dalamud.Game.Gui /// <summary>
/// The address resolver for the <see cref="ChatGui"/> class.
/// </summary>
public sealed class ChatGuiAddressResolver : BaseAddressResolver
{ {
/// <summary>
/// The address resolver for the <see cref="ChatGui"/> class.
/// </summary>
public sealed class ChatGuiAddressResolver : BaseAddressResolver
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ChatGuiAddressResolver"/> class. /// Initializes a new instance of the <see cref="ChatGuiAddressResolver"/> class.
/// </summary> /// </summary>
@ -116,5 +114,4 @@ namespace Dalamud.Game.Gui
this.InteractableLinkClicked = sig.ScanText("E8 ?? ?? ?? ?? E9 ?? ?? ?? ?? 80 BB ?? ?? ?? ?? ?? 0F 85 ?? ?? ?? ?? 80 BB") + 9; this.InteractableLinkClicked = sig.ScanText("E8 ?? ?? ?? ?? E9 ?? ?? ?? ?? 80 BB ?? ?? ?? ?? ?? 0F 85 ?? ?? ?? ?? 80 BB") + 9;
} }
}
} }

View file

@ -9,15 +9,15 @@ using Dalamud.IoC.Internal;
using Dalamud.Memory; using Dalamud.Memory;
using Serilog; using Serilog;
namespace Dalamud.Game.Gui.FlyText namespace Dalamud.Game.Gui.FlyText;
/// <summary>
/// This class facilitates interacting with and creating native in-game "fly text".
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed class FlyTextGui : IDisposable
{ {
/// <summary>
/// This class facilitates interacting with and creating native in-game "fly text".
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed class FlyTextGui : IDisposable
{
/// <summary> /// <summary>
/// The native function responsible for adding fly text to the UI. See <see cref="FlyTextGuiAddressResolver.AddFlyText"/>. /// The native function responsible for adding fly text to the UI. See <see cref="FlyTextGuiAddressResolver.AddFlyText"/>.
/// </summary> /// </summary>
@ -307,5 +307,4 @@ namespace Dalamud.Game.Gui.FlyText
return retVal; return retVal;
} }
}
} }

View file

@ -1,12 +1,12 @@
using System; using System;
namespace Dalamud.Game.Gui.FlyText namespace Dalamud.Game.Gui.FlyText;
/// <summary>
/// An address resolver for the <see cref="FlyTextGui"/> class.
/// </summary>
public class FlyTextGuiAddressResolver : BaseAddressResolver
{ {
/// <summary>
/// An address resolver for the <see cref="FlyTextGui"/> class.
/// </summary>
public class FlyTextGuiAddressResolver : BaseAddressResolver
{
/// <summary> /// <summary>
/// Gets the address of the native AddFlyText method, which occurs /// Gets the address of the native AddFlyText method, which occurs
/// when the game adds fly text elements to the UI. Multiple fly text /// when the game adds fly text elements to the UI. Multiple fly text
@ -28,5 +28,4 @@ namespace Dalamud.Game.Gui.FlyText
this.AddFlyText = sig.ScanText("E8 ?? ?? ?? ?? FF C7 41 D1 C7"); this.AddFlyText = sig.ScanText("E8 ?? ?? ?? ?? FF C7 41 D1 C7");
this.CreateFlyText = sig.ScanText("48 89 74 24 ?? 48 89 7C 24 ?? 41 56 48 83 EC 40 48 63 FA"); this.CreateFlyText = sig.ScanText("48 89 74 24 ?? 48 89 7C 24 ?? 41 56 48 83 EC 40 48 63 FA");
} }
}
} }

View file

@ -1,11 +1,11 @@
namespace Dalamud.Game.Gui.FlyText namespace Dalamud.Game.Gui.FlyText;
/// <summary>
/// Enum of FlyTextKind values. Members suffixed with
/// a number seem to be a duplicate, or perform duplicate behavior.
/// </summary>
public enum FlyTextKind : int
{ {
/// <summary>
/// Enum of FlyTextKind values. Members suffixed with
/// a number seem to be a duplicate, or perform duplicate behavior.
/// </summary>
public enum FlyTextKind : int
{
/// <summary> /// <summary>
/// Val1 in serif font, Text2 in sans-serif as subtitle. /// Val1 in serif font, Text2 in sans-serif as subtitle.
/// Used for autos and incoming DoTs. /// Used for autos and incoming DoTs.
@ -279,5 +279,4 @@ namespace Dalamud.Game.Gui.FlyText
/// Does a large bounce effect on appearance. Does not scroll up or down the screen. /// Does a large bounce effect on appearance. Does not scroll up or down the screen.
/// </summary> /// </summary>
CriticalDirectHit2 = 51, CriticalDirectHit2 = 51,
}
} }

View file

@ -14,15 +14,15 @@ using Dalamud.Utility;
using ImGuiNET; using ImGuiNET;
using Serilog; using Serilog;
namespace Dalamud.Game.Gui namespace Dalamud.Game.Gui;
/// <summary>
/// A class handling many aspects of the in-game UI.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed class GameGui : IDisposable
{ {
/// <summary>
/// A class handling many aspects of the in-game UI.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed class GameGui : IDisposable
{
private readonly GameGuiAddressResolver address; private readonly GameGuiAddressResolver address;
private readonly GetMatrixSingletonDelegate getMatrixSingleton; private readonly GetMatrixSingletonDelegate getMatrixSingleton;
@ -593,5 +593,4 @@ namespace Dalamud.Game.Gui
? (char)0 ? (char)0
: result; : result;
} }
}
} }

View file

@ -1,13 +1,13 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Dalamud.Game.Gui namespace Dalamud.Game.Gui;
/// <summary>
/// The address resolver for the <see cref="GameGui"/> class.
/// </summary>
internal sealed class GameGuiAddressResolver : BaseAddressResolver
{ {
/// <summary>
/// The address resolver for the <see cref="GameGui"/> class.
/// </summary>
internal sealed class GameGuiAddressResolver : BaseAddressResolver
{
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="GameGuiAddressResolver"/> class. /// Initializes a new instance of the <see cref="GameGuiAddressResolver"/> class.
/// </summary> /// </summary>
@ -100,5 +100,4 @@ namespace Dalamud.Game.Gui
// Xiv__UiManager__GetChatManager+7 000 retn // Xiv__UiManager__GetChatManager+7 000 retn
this.ChatManager = this.BaseAddress + 0x13E0; this.ChatManager = this.BaseAddress + 0x13E0;
} }
}
} }

View file

@ -1,11 +1,11 @@
namespace Dalamud.Game.Gui namespace Dalamud.Game.Gui;
/// <summary>
/// ActionKinds used in AgentActionDetail.
/// These describe the possible kinds of actions being hovered.
/// </summary>
public enum HoverActionKind
{ {
/// <summary>
/// ActionKinds used in AgentActionDetail.
/// These describe the possible kinds of actions being hovered.
/// </summary>
public enum HoverActionKind
{
/// <summary> /// <summary>
/// No action is hovered. /// No action is hovered.
/// </summary> /// </summary>
@ -45,5 +45,4 @@ namespace Dalamud.Game.Gui
/// A trait is hovered. /// A trait is hovered.
/// </summary> /// </summary>
Trait = 29, Trait = 29,
}
} }

View file

@ -1,10 +1,10 @@
namespace Dalamud.Game.Gui namespace Dalamud.Game.Gui;
/// <summary>
/// This class represents the hotbar action currently hovered over by the cursor.
/// </summary>
public class HoveredAction
{ {
/// <summary>
/// This class represents the hotbar action currently hovered over by the cursor.
/// </summary>
public class HoveredAction
{
/// <summary> /// <summary>
/// Gets or sets the base action ID. /// Gets or sets the base action ID.
/// </summary> /// </summary>
@ -19,5 +19,4 @@ namespace Dalamud.Game.Gui
/// Gets or sets the type of action. /// Gets or sets the type of action.
/// </summary> /// </summary>
public HoverActionKind ActionKind { get; set; } = HoverActionKind.None; public HoverActionKind ActionKind { get; set; } = HoverActionKind.None;
}
} }

View file

@ -9,13 +9,13 @@ using ImGuiNET;
using static Dalamud.NativeFunctions; using static Dalamud.NativeFunctions;
namespace Dalamud.Game.Gui.Internal namespace Dalamud.Game.Gui.Internal;
/// <summary>
/// This class handles IME for non-English users.
/// </summary>
internal class DalamudIME : IDisposable
{ {
/// <summary>
/// This class handles IME for non-English users.
/// </summary>
internal class DalamudIME : IDisposable
{
private static readonly ModuleLog Log = new("IME"); private static readonly ModuleLog Log = new("IME");
private IntPtr interfaceHandle; private IntPtr interfaceHandle;
@ -239,5 +239,4 @@ namespace Dalamud.Game.Gui.Internal
return CallWindowProcW(this.oldWndProcPtr, hWnd, msg, wParam, lParam); return CallWindowProcW(this.oldWndProcPtr, hWnd, msg, wParam, lParam);
} }
}
} }

View file

@ -1,17 +1,17 @@
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Dalamud.Game.Gui.PartyFinder.Internal namespace Dalamud.Game.Gui.PartyFinder.Internal;
/// <summary>
/// The structure of the PartyFinder packet.
/// </summary>
[SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1201:Elements should appear in the correct order", Justification = "Sequential struct marshaling.")]
[SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1202:Elements should be ordered by access", Justification = "Sequential struct marshaling.")]
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:Elements should be documented", Justification = "Document the field usage.")]
[StructLayout(LayoutKind.Sequential)]
internal readonly struct PartyFinderPacket
{ {
/// <summary>
/// The structure of the PartyFinder packet.
/// </summary>
[SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1201:Elements should appear in the correct order", Justification = "Sequential struct marshaling.")]
[SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1202:Elements should be ordered by access", Justification = "Sequential struct marshaling.")]
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:Elements should be documented", Justification = "Document the field usage.")]
[StructLayout(LayoutKind.Sequential)]
internal readonly struct PartyFinderPacket
{
/// <summary> /// <summary>
/// Gets the size of this packet. /// Gets the size of this packet.
/// </summary> /// </summary>
@ -24,5 +24,4 @@ namespace Dalamud.Game.Gui.PartyFinder.Internal
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
internal readonly PartyFinderPacketListing[] Listings; internal readonly PartyFinderPacketListing[] Listings;
}
} }

View file

@ -2,16 +2,16 @@ using System.Diagnostics.CodeAnalysis;
using System.Linq; using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Dalamud.Game.Gui.PartyFinder.Internal namespace Dalamud.Game.Gui.PartyFinder.Internal;
/// <summary>
/// The structure of an individual listing within a packet.
/// </summary>
[SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1202:Elements should be ordered by access", Justification = "Sequential struct marshaling.")]
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:Elements should be documented", Justification = "Document the field usage.")]
[StructLayout(LayoutKind.Sequential)]
internal readonly struct PartyFinderPacketListing
{ {
/// <summary>
/// The structure of an individual listing within a packet.
/// </summary>
[SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1202:Elements should be ordered by access", Justification = "Sequential struct marshaling.")]
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:Elements should be documented", Justification = "Document the field usage.")]
[StructLayout(LayoutKind.Sequential)]
internal readonly struct PartyFinderPacketListing
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
private readonly byte[] header1; private readonly byte[] header1;
internal readonly uint Id; internal readonly uint Id;
@ -95,5 +95,4 @@ namespace Dalamud.Game.Gui.PartyFinder.Internal
// a valid party finder must have at least one slot set // a valid party finder must have at least one slot set
return this.Slots.All(slot => slot == 0); return this.Slots.All(slot => slot == 0);
} }
}
} }

View file

@ -1,12 +1,12 @@
using System; using System;
namespace Dalamud.Game.Gui.PartyFinder namespace Dalamud.Game.Gui.PartyFinder;
/// <summary>
/// The address resolver for the <see cref="PartyFinderGui"/> class.
/// </summary>
public class PartyFinderAddressResolver : BaseAddressResolver
{ {
/// <summary>
/// The address resolver for the <see cref="PartyFinderGui"/> class.
/// </summary>
public class PartyFinderAddressResolver : BaseAddressResolver
{
/// <summary> /// <summary>
/// Gets the address of the native ReceiveListing method. /// Gets the address of the native ReceiveListing method.
/// </summary> /// </summary>
@ -17,5 +17,4 @@ namespace Dalamud.Game.Gui.PartyFinder
{ {
this.ReceiveListing = sig.ScanText("40 53 41 57 48 83 EC 28 48 8B D9"); this.ReceiveListing = sig.ScanText("40 53 41 57 48 83 EC 28 48 8B D9");
} }
}
} }

View file

@ -8,15 +8,15 @@ using Dalamud.IoC;
using Dalamud.IoC.Internal; using Dalamud.IoC.Internal;
using Serilog; using Serilog;
namespace Dalamud.Game.Gui.PartyFinder namespace Dalamud.Game.Gui.PartyFinder;
/// <summary>
/// This class handles interacting with the native PartyFinder window.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed class PartyFinderGui : IDisposable
{ {
/// <summary>
/// This class handles interacting with the native PartyFinder window.
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
public sealed class PartyFinderGui : IDisposable
{
private readonly PartyFinderAddressResolver address; private readonly PartyFinderAddressResolver address;
private readonly IntPtr memory; private readonly IntPtr memory;
@ -136,5 +136,4 @@ namespace Dalamud.Game.Gui.PartyFinder
Buffer.MemoryCopy((void*)this.memory, (void*)dataPtr, PartyFinderPacket.PacketSize, PartyFinderPacket.PacketSize); Buffer.MemoryCopy((void*)this.memory, (void*)dataPtr, PartyFinderPacket.PacketSize, PartyFinderPacket.PacketSize);
} }
} }
}
} }

View file

@ -1,13 +1,13 @@
using System; using System;
namespace Dalamud.Game.Gui.PartyFinder.Types namespace Dalamud.Game.Gui.PartyFinder.Types;
/// <summary>
/// Condition flags for the <see cref="PartyFinderGui"/> class.
/// </summary>
[Flags]
public enum ConditionFlags : uint
{ {
/// <summary>
/// Condition flags for the <see cref="PartyFinderGui"/> class.
/// </summary>
[Flags]
public enum ConditionFlags : uint
{
/// <summary> /// <summary>
/// No duty condition. /// No duty condition.
/// </summary> /// </summary>
@ -22,5 +22,4 @@ namespace Dalamud.Game.Gui.PartyFinder.Types
/// The duty incomplete condition. /// The duty incomplete condition.
/// </summary> /// </summary>
DutyIncomplete = 4, DutyIncomplete = 4,
}
} }

View file

@ -1,10 +1,10 @@
namespace Dalamud.Game.Gui.PartyFinder.Types namespace Dalamud.Game.Gui.PartyFinder.Types;
/// <summary>
/// Category flags for the <see cref="PartyFinderGui"/> class.
/// </summary>
public enum DutyCategory
{ {
/// <summary>
/// Category flags for the <see cref="PartyFinderGui"/> class.
/// </summary>
public enum DutyCategory
{
/// <summary> /// <summary>
/// The duty category. /// The duty category.
/// </summary> /// </summary>
@ -44,5 +44,4 @@ namespace Dalamud.Game.Gui.PartyFinder.Types
/// The adventuring forays category. /// The adventuring forays category.
/// </summary> /// </summary>
AdventuringForays = 1 << 6, AdventuringForays = 1 << 6,
}
} }

View file

@ -1,13 +1,13 @@
using System; using System;
namespace Dalamud.Game.Gui.PartyFinder.Types namespace Dalamud.Game.Gui.PartyFinder.Types;
/// <summary>
/// Duty finder settings flags for the <see cref="PartyFinderGui"/> class.
/// </summary>
[Flags]
public enum DutyFinderSettingsFlags : uint
{ {
/// <summary>
/// Duty finder settings flags for the <see cref="PartyFinderGui"/> class.
/// </summary>
[Flags]
public enum DutyFinderSettingsFlags : uint
{
/// <summary> /// <summary>
/// No duty finder settings. /// No duty finder settings.
/// </summary> /// </summary>
@ -27,5 +27,4 @@ namespace Dalamud.Game.Gui.PartyFinder.Types
/// The silence echo setting. /// The silence echo setting.
/// </summary> /// </summary>
SilenceEcho = 1 << 2, SilenceEcho = 1 << 2,
}
} }

Some files were not shown because too many files have changed in this diff Show more