mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 05:04:15 +01:00
refactor: ObjectTable.SearchByID -> SearchById
This commit is contained in:
parent
ff6fa4bf50
commit
cf54c6dc30
5 changed files with 7 additions and 7 deletions
|
|
@ -36,7 +36,7 @@ namespace Dalamud.Game.ClientState.Buddy
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// This iterates the actor table, it should be used with care.
|
/// This iterates the actor table, it should be used with care.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public GameObject? GameObject => Service<ObjectTable>.Get().SearchByID(this.ObjectId);
|
public GameObject? GameObject => Service<ObjectTable>.Get().SearchById(this.ObjectId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the current health of this buddy.
|
/// Gets the current health of this buddy.
|
||||||
|
|
|
||||||
|
|
@ -61,16 +61,16 @@ namespace Dalamud.Game.ClientState.Objects
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Search for a game object by their Object ID.
|
/// Search for a game object by their Object ID.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="objectID">Object ID to find.</param>
|
/// <param name="objectId">Object ID to find.</param>
|
||||||
/// <returns>A game object or null.</returns>
|
/// <returns>A game object or null.</returns>
|
||||||
public GameObject? SearchByID(uint objectID)
|
public GameObject? SearchById(uint objectId)
|
||||||
{
|
{
|
||||||
foreach (var obj in this)
|
foreach (var obj in this)
|
||||||
{
|
{
|
||||||
if (obj == null)
|
if (obj == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (obj.ObjectId == objectID)
|
if (obj.ObjectId == objectId)
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,7 @@ namespace Dalamud.Game.ClientState.Objects.Types
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// This iterates the actor table, it should be used with care.
|
/// This iterates the actor table, it should be used with care.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public virtual GameObject? TargetObject => Service<ObjectTable>.Get().SearchByID(this.TargetObjectId);
|
public virtual GameObject? TargetObject => Service<ObjectTable>.Get().SearchById(this.TargetObjectId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the underlying structure.
|
/// Gets the underlying structure.
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ namespace Dalamud.Game.ClientState.Party
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// This iterates the actor table, it should be used with care.
|
/// This iterates the actor table, it should be used with care.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public GameObject? GameObject => Service<ObjectTable>.Get().SearchByID(this.ObjectId);
|
public GameObject? GameObject => Service<ObjectTable>.Get().SearchById(this.ObjectId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the current HP of this party member.
|
/// Gets the current HP of this party member.
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ namespace Dalamud.Game.ClientState.Statuses
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// This iterates the actor table, it should be used with care.
|
/// This iterates the actor table, it should be used with care.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue