mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
Add mentor states
This commit is contained in:
parent
c2fc04c3a8
commit
153870a053
2 changed files with 43 additions and 0 deletions
|
|
@ -151,6 +151,21 @@ internal unsafe class PlayerState : IServiceType, IPlayerState
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public MentorVersion MentorVersion => this.IsLoaded ? (MentorVersion)CSPlayerState.Instance()->MentorVersion : default;
|
public MentorVersion MentorVersion => this.IsLoaded ? (MentorVersion)CSPlayerState.Instance()->MentorVersion : default;
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public bool IsMentor => this.IsLoaded && CSPlayerState.Instance()->IsMentor();
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public bool IsBattleMentor => this.IsLoaded && CSPlayerState.Instance()->IsBattleMentor();
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public bool IsTradeMentor => this.IsLoaded && CSPlayerState.Instance()->IsTradeMentor();
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public bool IsNovice => this.IsLoaded && CSPlayerState.Instance()->IsNovice();
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public bool IsReturner => this.IsLoaded && CSPlayerState.Instance()->IsReturner();
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public int GetAttribute(PlayerAttribute attribute) => this.IsLoaded ? CSPlayerState.Instance()->Attributes[(int)attribute] : default;
|
public int GetAttribute(PlayerAttribute attribute) => this.IsLoaded ? CSPlayerState.Instance()->Attributes[(int)attribute] : default;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -176,6 +176,34 @@ public interface IPlayerState
|
||||||
/// </summary>
|
/// </summary>
|
||||||
MentorVersion MentorVersion { get; }
|
MentorVersion MentorVersion { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a value indicating whether the local player is any kind of Mentor (Battle or Trade Mentor).
|
||||||
|
/// </summary>
|
||||||
|
bool IsMentor { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a value indicating whether the local player is a Battle Mentor.
|
||||||
|
/// </summary>
|
||||||
|
bool IsBattleMentor { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a value indicating whether the local player is a Trade Mentor.
|
||||||
|
/// </summary>
|
||||||
|
bool IsTradeMentor { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a value indicating whether the local player is a novice (aka. Sprout or New Adventurer).
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Can be <see langword="false"/> if <c>/nastatus</c> was used to deactivate it.
|
||||||
|
/// </remarks>
|
||||||
|
bool IsNovice { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a value indicating whether the local player is a returner.
|
||||||
|
/// </summary>
|
||||||
|
bool IsReturner { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the value of an attribute of the local character.
|
/// Gets the value of an attribute of the local character.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue