Skip to content

Commit

Permalink
Merge pull request #1 from nihilistzsche/master
Browse files Browse the repository at this point in the history
Add GetGp and GetMaxGp methods.
  • Loading branch information
Jaksuhn authored Dec 6, 2023
2 parents 30ab131 + dc69f8a commit 582eaa2
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
14 changes: 14 additions & 0 deletions SomethingNeedDoing/Misc/CommandInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,20 @@ public int GetMaxCp()
return (int)cp;
}

/// <inheritdoc/>
public int GetGp()
{
var gp = Service.ClientState.LocalPlayer?.CurrentGp ?? 0;
return (int)gp;
}

/// <inheritdoc/>
public int GetMaxGp()
{
var gp = Service.ClientState.LocalPlayer?.MaxGp ?? 0;
return (int)gp;
}

/// <inheritdoc/>
public unsafe int GetStep()
{
Expand Down
12 changes: 12 additions & 0 deletions SomethingNeedDoing/Misc/ICommandInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,18 @@ public interface ICommandInterface
/// <returns>The max CP amount.</returns>
public int GetMaxCp();

/// <summary>
/// Get the current GP amount.
/// </summary>
/// <returns>The current GP amount.</returns>
public int GetGp();

/// <summary>
/// Get the max GP amount.
/// </summary>
/// <returns>The max GP amount.</returns>
public int GetMaxGp();

/// <summary>
/// Get the current step value.
/// </summary>
Expand Down

0 comments on commit 582eaa2

Please sign in to comment.