From ed9c68360242301276e48bd6bbe18e34ccaaae1e Mon Sep 17 00:00:00 2001 From: fallenoak Date: Thu, 5 Feb 2026 16:01:46 -0600 Subject: [PATCH] feat(object): add CGPlayer_C::GetActiveNextLevelXP --- src/object/client/CGPlayer_C.cpp | 8 ++++++++ src/object/client/CGPlayer_C.hpp | 1 + 2 files changed, 9 insertions(+) diff --git a/src/object/client/CGPlayer_C.cpp b/src/object/client/CGPlayer_C.cpp index cb43f4c..34ccb52 100644 --- a/src/object/client/CGPlayer_C.cpp +++ b/src/object/client/CGPlayer_C.cpp @@ -12,6 +12,14 @@ CGPlayer_C::~CGPlayer_C() { // TODO } +uint32_t CGPlayer_C::GetActiveNextLevelXP() const { + if (this->GetGUID() != ClntObjMgrGetActivePlayer()) { + return 0; + } + + return this->GetNextLevelXP(); +} + uint32_t CGPlayer_C::GetActiveXP() const { if (this->GetGUID() != ClntObjMgrGetActivePlayer()) { return 0; diff --git a/src/object/client/CGPlayer_C.hpp b/src/object/client/CGPlayer_C.hpp index 85db184..20813a8 100644 --- a/src/object/client/CGPlayer_C.hpp +++ b/src/object/client/CGPlayer_C.hpp @@ -15,6 +15,7 @@ class CGPlayer_C : public CGUnit_C, public CGPlayer { // Public member functions CGPlayer_C(uint32_t time, CClientObjCreate& objCreate); + uint32_t GetActiveNextLevelXP() const; uint32_t GetActiveXP() const; void PostInit(uint32_t time, const CClientObjCreate& init, bool a4); void SetStorage(uint32_t* storage, uint32_t* saved);