feat(object): add total fields accessor to base object classes

This commit is contained in:
fallenoak 2026-01-09 23:08:41 -06:00
parent e46451b2f4
commit 5fbd78d529
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
16 changed files with 45 additions and 0 deletions

View File

@ -1,6 +1,10 @@
#include "object/client/CGContainer.hpp" #include "object/client/CGContainer.hpp"
#include "object/client/CGItem.hpp" #include "object/client/CGItem.hpp"
uint32_t CGContainer::TotalFields() {
return CGItem::TotalFields() + 74;
}
uint32_t CGContainer::TotalFieldsSaved() { uint32_t CGContainer::TotalFieldsSaved() {
return CGItem::TotalFieldsSaved() + 72; return CGItem::TotalFieldsSaved() + 72;
} }

View File

@ -10,6 +10,7 @@ struct CGContainerData {
class CGContainer { class CGContainer {
public: public:
// Public static functions // Public static functions
static uint32_t TotalFields();
static uint32_t TotalFieldsSaved(); static uint32_t TotalFieldsSaved();
}; };

View File

@ -1,6 +1,10 @@
#include "object/client/CGCorpse.hpp" #include "object/client/CGCorpse.hpp"
#include "object/client/CGObject.hpp" #include "object/client/CGObject.hpp"
uint32_t CGCorpse::TotalFields() {
return CGObject::TotalFields() + 30;
}
uint32_t CGCorpse::TotalFieldsSaved() { uint32_t CGCorpse::TotalFieldsSaved() {
return CGObject::TotalFieldsSaved() + 3; return CGObject::TotalFieldsSaved() + 3;
} }

View File

@ -10,6 +10,7 @@ struct CGCorpseData {
class CGCorpse { class CGCorpse {
public: public:
// Public static functions // Public static functions
static uint32_t TotalFields();
static uint32_t TotalFieldsSaved(); static uint32_t TotalFieldsSaved();
}; };

View File

@ -1,6 +1,10 @@
#include "object/client/CGDynamicObject.hpp" #include "object/client/CGDynamicObject.hpp"
#include "object/client/CGObject.hpp" #include "object/client/CGObject.hpp"
uint32_t CGDynamicObject::TotalFields() {
return CGObject::TotalFields() + 6;
}
uint32_t CGDynamicObject::TotalFieldsSaved() { uint32_t CGDynamicObject::TotalFieldsSaved() {
return CGObject::TotalFieldsSaved(); return CGObject::TotalFieldsSaved();
} }

View File

@ -10,6 +10,7 @@ struct CGDynamicObjectData {
class CGDynamicObject { class CGDynamicObject {
public: public:
// Public static functions // Public static functions
static uint32_t TotalFields();
static uint32_t TotalFieldsSaved(); static uint32_t TotalFieldsSaved();
}; };

View File

@ -1,6 +1,10 @@
#include "object/client/CGGameObject.hpp" #include "object/client/CGGameObject.hpp"
#include "object/client/CGObject.hpp" #include "object/client/CGObject.hpp"
uint32_t CGGameObject::TotalFields() {
return CGObject::TotalFields() + 12;
}
uint32_t CGGameObject::TotalFieldsSaved() { uint32_t CGGameObject::TotalFieldsSaved() {
return CGObject::TotalFieldsSaved() + 4; return CGObject::TotalFieldsSaved() + 4;
} }

View File

@ -10,6 +10,7 @@ struct CGGameObjectData {
class CGGameObject { class CGGameObject {
public: public:
// Public static functions // Public static functions
static uint32_t TotalFields();
static uint32_t TotalFieldsSaved(); static uint32_t TotalFieldsSaved();
}; };

View File

@ -1,6 +1,10 @@
#include "object/client/CGItem.hpp" #include "object/client/CGItem.hpp"
#include "object/client/CGObject.hpp" #include "object/client/CGObject.hpp"
uint32_t CGItem::TotalFields() {
return CGObject::TotalFields() + 58;
}
uint32_t CGItem::TotalFieldsSaved() { uint32_t CGItem::TotalFieldsSaved() {
return CGObject::TotalFieldsSaved() + 47; return CGObject::TotalFieldsSaved() + 47;
} }

View File

@ -10,6 +10,7 @@ struct CGItemData {
class CGItem { class CGItem {
public: public:
// Public static functions // Public static functions
static uint32_t TotalFields();
static uint32_t TotalFieldsSaved(); static uint32_t TotalFieldsSaved();
}; };

View File

@ -1,5 +1,9 @@
#include "object/client/CGObject.hpp" #include "object/client/CGObject.hpp"
uint32_t CGObject::TotalFields() {
return 6;
}
uint32_t CGObject::TotalFieldsSaved() { uint32_t CGObject::TotalFieldsSaved() {
return 3; return 3;
} }

View File

@ -15,6 +15,7 @@ struct CGObjectData {
class CGObject { class CGObject {
public: public:
// Public static functions // Public static functions
static uint32_t TotalFields();
static uint32_t TotalFieldsSaved(); static uint32_t TotalFieldsSaved();
// Public member variables // Public member variables

View File

@ -1,6 +1,14 @@
#include "object/client/CGPlayer.hpp" #include "object/client/CGPlayer.hpp"
#include "object/client/CGUnit.hpp" #include "object/client/CGUnit.hpp"
uint32_t CGPlayer::TotalFields() {
return CGUnit::TotalFields() + 1178;
}
uint32_t CGPlayer::TotalRemoteFields() {
return CGUnit::TotalFields() + 176;
}
uint32_t CGPlayer::TotalFieldsSaved() { uint32_t CGPlayer::TotalFieldsSaved() {
return CGUnit::TotalFieldsSaved() + 1043; return CGUnit::TotalFieldsSaved() + 1043;
} }

View File

@ -10,6 +10,8 @@ struct CGPlayerData {
class CGPlayer { class CGPlayer {
public: public:
// Public static functions // Public static functions
static uint32_t TotalFields();
static uint32_t TotalRemoteFields();
static uint32_t TotalFieldsSaved(); static uint32_t TotalFieldsSaved();
static uint32_t TotalRemoteFieldsSaved(); static uint32_t TotalRemoteFieldsSaved();
}; };

View File

@ -1,6 +1,10 @@
#include "object/client/CGUnit.hpp" #include "object/client/CGUnit.hpp"
#include "object/client/CGObject.hpp" #include "object/client/CGObject.hpp"
uint32_t CGUnit::TotalFields() {
return CGObject::TotalFields() + 142;
}
uint32_t CGUnit::TotalFieldsSaved() { uint32_t CGUnit::TotalFieldsSaved() {
return CGObject::TotalFieldsSaved() + 123; return CGObject::TotalFieldsSaved() + 123;
} }

View File

@ -10,6 +10,7 @@ struct CGUnitData {
class CGUnit { class CGUnit {
public: public:
// Public static functions // Public static functions
static uint32_t TotalFields();
static uint32_t TotalFieldsSaved(); static uint32_t TotalFieldsSaved();
}; };