From dc69f8aea84292abdd65a773fa75eb671cc69935 Mon Sep 17 00:00:00 2001 From: Nihilistzsche Date: Mon, 20 Nov 2023 01:46:59 -0800 Subject: [PATCH] Add GetGp and GetMaxGp methods. --- SomethingNeedDoing/Misc/CommandInterface.cs | 14 ++++++++++++++ SomethingNeedDoing/Misc/ICommandInterface.cs | 12 ++++++++++++ 2 files changed, 26 insertions(+) diff --git a/SomethingNeedDoing/Misc/CommandInterface.cs b/SomethingNeedDoing/Misc/CommandInterface.cs index ead1dab0..5b08c81d 100644 --- a/SomethingNeedDoing/Misc/CommandInterface.cs +++ b/SomethingNeedDoing/Misc/CommandInterface.cs @@ -151,6 +151,20 @@ public int GetMaxCp() return (int)cp; } + /// + public int GetGp() + { + var gp = Service.ClientState.LocalPlayer?.CurrentGp ?? 0; + return (int)gp; + } + + /// + public int GetMaxGp() + { + var gp = Service.ClientState.LocalPlayer?.MaxGp ?? 0; + return (int)gp; + } + /// public unsafe int GetStep() { diff --git a/SomethingNeedDoing/Misc/ICommandInterface.cs b/SomethingNeedDoing/Misc/ICommandInterface.cs index e86654a7..edb18ec2 100644 --- a/SomethingNeedDoing/Misc/ICommandInterface.cs +++ b/SomethingNeedDoing/Misc/ICommandInterface.cs @@ -99,6 +99,18 @@ public interface ICommandInterface /// The max CP amount. public int GetMaxCp(); + /// + /// Get the current GP amount. + /// + /// The current GP amount. + public int GetGp(); + + /// + /// Get the max GP amount. + /// + /// The max GP amount. + public int GetMaxGp(); + /// /// Get the current step value. ///