mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-18 13:57:43 +01:00
Excel Resolver
This commit is contained in:
parent
bfb8277a72
commit
9e06671f8a
7 changed files with 9 additions and 85 deletions
|
|
@ -65,7 +65,7 @@ namespace Dalamud.Game.ClientState.Actors.Types
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the ClassJob of this Chara.
|
/// Gets the ClassJob of this Chara.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ClassJobResolver ClassJob => new(*(byte*)(this.Address + ActorOffsets.ClassJob), this.Dalamud);
|
public ExcelResolver<Lumina.Excel.GeneratedSheets.ClassJob> ClassJob => new(*(byte*)(this.Address + ActorOffsets.ClassJob), this.Dalamud);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the level of this Chara.
|
/// Gets the level of this Chara.
|
||||||
|
|
|
||||||
|
|
@ -23,14 +23,14 @@ namespace Dalamud.Game.ClientState.Actors.Types
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the current <see cref="WorldResolver">world</see> of the character.
|
/// Gets the current <see cref="ExcelResolver{T}">world</see> of the character.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public WorldResolver CurrentWorld => new(*(ushort*)(this.Address + ActorOffsets.CurrentWorld), this.Dalamud);
|
public ExcelResolver<Lumina.Excel.GeneratedSheets.World> CurrentWorld => new(*(ushort*)(this.Address + ActorOffsets.CurrentWorld), this.Dalamud);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the home <see cref="WorldResolver">world</see> of the character.
|
/// Gets the home <see cref="ExcelResolver{T}">world</see> of the character.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public WorldResolver HomeWorld => new(*(ushort*)(this.Address + ActorOffsets.HomeWorld), this.Dalamud);
|
public ExcelResolver<Lumina.Excel.GeneratedSheets.World> HomeWorld => new(*(ushort*)(this.Address + ActorOffsets.HomeWorld), this.Dalamud);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the Free Company tag of this player.
|
/// Gets the Free Company tag of this player.
|
||||||
|
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
namespace Dalamud.Game.ClientState.Resolvers
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// This object represents a class or job.
|
|
||||||
/// </summary>
|
|
||||||
public class ClassJobResolver : BaseResolver<Lumina.Excel.GeneratedSheets.ClassJob>
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes a new instance of the <see cref="ClassJobResolver"/> class.
|
|
||||||
/// Set up the ClassJob resolver with the provided ID.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="id">The ID of the classJob.</param>
|
|
||||||
/// <param name="dalamud">The Dalamud instance.</param>
|
|
||||||
internal ClassJobResolver(ushort id, Dalamud dalamud)
|
|
||||||
: base(id, dalamud)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -3,19 +3,19 @@ using Lumina.Excel;
|
||||||
namespace Dalamud.Game.ClientState.Resolvers
|
namespace Dalamud.Game.ClientState.Resolvers
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This object represents a class or job.
|
/// This object resolves a rowID within an Excel sheet.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="T">The type of Lumina sheet to resolve.</typeparam>
|
/// <typeparam name="T">The type of Lumina sheet to resolve.</typeparam>
|
||||||
public class BaseResolver<T> where T : ExcelRow
|
public class ExcelResolver<T> where T : ExcelRow
|
||||||
{
|
{
|
||||||
private readonly Dalamud dalamud;
|
private readonly Dalamud dalamud;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="BaseResolver{T}"/> class.
|
/// Initializes a new instance of the <see cref="ExcelResolver{T}"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">The ID of the classJob.</param>
|
/// <param name="id">The ID of the classJob.</param>
|
||||||
/// <param name="dalamud">The Dalamud instance.</param>
|
/// <param name="dalamud">The Dalamud instance.</param>
|
||||||
internal BaseResolver(uint id, Dalamud dalamud)
|
internal ExcelResolver(uint id, Dalamud dalamud)
|
||||||
{
|
{
|
||||||
this.dalamud = dalamud;
|
this.dalamud = dalamud;
|
||||||
this.Id = id;
|
this.Id = id;
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
namespace Dalamud.Game.ClientState.Resolvers
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// This object represents a Fate a character can participate in.
|
|
||||||
/// </summary>
|
|
||||||
public class FateResolver : BaseResolver<Lumina.Excel.GeneratedSheets.Fate>
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes a new instance of the <see cref="FateResolver"/> class.
|
|
||||||
/// Set up the Fate resolver with the provided ID.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="id">The ID of the Fate.</param>
|
|
||||||
/// <param name="dalamud">The Dalamud instance.</param>
|
|
||||||
internal FateResolver(ushort id, Dalamud dalamud)
|
|
||||||
: base(id, dalamud)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
namespace Dalamud.Game.ClientState.Resolvers
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// This object represents a territory a character can be in.
|
|
||||||
/// </summary>
|
|
||||||
public class TerritoryTypeResolver : BaseResolver<Lumina.Excel.GeneratedSheets.TerritoryType>
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes a new instance of the <see cref="TerritoryTypeResolver"/> class.
|
|
||||||
/// Set up the territory type resolver with the provided ID.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="id">The ID of the territory type.</param>
|
|
||||||
/// <param name="dalamud">The Dalamud instance.</param>
|
|
||||||
internal TerritoryTypeResolver(ushort id, Dalamud dalamud)
|
|
||||||
: base(id, dalamud)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
namespace Dalamud.Game.ClientState.Resolvers
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// This object represents a world a character can reside on.
|
|
||||||
/// </summary>
|
|
||||||
public class WorldResolver : BaseResolver<Lumina.Excel.GeneratedSheets.World>
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes a new instance of the <see cref="WorldResolver"/> class.
|
|
||||||
/// Set up the world resolver with the provided ID.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="id">The ID of the world.</param>
|
|
||||||
/// <param name="dalamud">The Dalamud instance.</param>
|
|
||||||
internal WorldResolver(ushort id, Dalamud dalamud)
|
|
||||||
: base(id, dalamud)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue