feat(object): simplify getters in CGPlayer_C

This commit is contained in:
fallenoak committed 2026-02-06 10:36:54 -06:00
1 parent 4bf88801ed
commit 68ad71090e
3 files changed
+8 -8

No files matched your search

+4 -4
View File
@@ -14,20 +14,20 @@ CGPlayer_C::~CGPlayer_C() {
// TODO
}
uint32_t CGPlayer_C::GetActiveNextLevelXP() const {
uint32_t CGPlayer_C::GetNextLevelXP() const {
if (this->GetGUID() != ClntObjMgrGetActivePlayer()) {
return 0;
}
return this->GetNextLevelXP();
return this->CGPlayer::GetNextLevelXP();
}
uint32_t CGPlayer_C::GetActiveXP() const {
uint32_t CGPlayer_C::GetXP() const {
if (this->GetGUID() != ClntObjMgrGetActivePlayer()) {
return 0;
}
return this->GetXP();
return this->CGPlayer::GetXP();
}
void CGPlayer_C::PostInit(uint32_t time, const CClientObjCreate& init, bool a4) {
+2 -2
View File
@@ -15,8 +15,8 @@ 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;
uint32_t GetNextLevelXP() const;
uint32_t GetXP() const;
void PostInit(uint32_t time, const CClientObjCreate& init, bool a4);
void PostInitActivePlayer();
void SetStorage(uint32_t* storage, uint32_t* saved);