diff --git a/src/glue/CCharacterCreation.cpp b/src/glue/CCharacterCreation.cpp index dca73cd..27d2a55 100644 --- a/src/glue/CCharacterCreation.cpp +++ b/src/glue/CCharacterCreation.cpp @@ -7,7 +7,7 @@ #include "glue/CGlueLoading.hpp" #include "model/CM2Shared.hpp" #include "net/Connection.hpp" -#include "object/client/Player_C.hpp" +#include "object/client/CGPlayer_C.hpp" #include "ui/simple/CSimpleModelFFX.hpp" #include "util/Random.hpp" #include diff --git a/src/glue/CCharacterCreationScript.cpp b/src/glue/CCharacterCreationScript.cpp index 471972a..819b772 100644 --- a/src/glue/CCharacterCreationScript.cpp +++ b/src/glue/CCharacterCreationScript.cpp @@ -4,7 +4,7 @@ #include "db/Db.hpp" #include "glue/CCharacterCreation.hpp" #include "net/Connection.hpp" -#include "object/client/Unit_C.hpp" +#include "object/client/CGUnit_C.hpp" #include "ui/FrameScript.hpp" #include "ui/Types.hpp" #include "ui/game/CGLookingForGroup.hpp" diff --git a/src/glue/CCharacterSelectionScript.cpp b/src/glue/CCharacterSelectionScript.cpp index 72cc6ae..0f5efea 100644 --- a/src/glue/CCharacterSelectionScript.cpp +++ b/src/glue/CCharacterSelectionScript.cpp @@ -1,7 +1,7 @@ #include "glue/CCharacterSelectionScript.hpp" #include "db/Db.hpp" #include "glue/CCharacterSelection.hpp" -#include "object/client/Unit_C.hpp" +#include "object/client/CGUnit_C.hpp" #include "ui/Types.hpp" #include "ui/simple/CSimpleModelFFX.hpp" #include "util/Lua.hpp" diff --git a/src/glue/CharacterSelectionDisplay.cpp b/src/glue/CharacterSelectionDisplay.cpp index bcb814e..b6b2271 100644 --- a/src/glue/CharacterSelectionDisplay.cpp +++ b/src/glue/CharacterSelectionDisplay.cpp @@ -2,7 +2,7 @@ #include "component/CCharacterComponent.hpp" #include "db/Db.hpp" #include "glue/CCharacterSelection.hpp" -#include "object/client/Player_C.hpp" +#include "object/client/CGPlayer_C.hpp" #include "ui/simple/CSimpleModelFFX.hpp" CharacterSelectionDisplay::~CharacterSelectionDisplay() { diff --git a/src/object/client/CGContainer.cpp b/src/object/client/CGContainer.cpp new file mode 100644 index 0000000..423af69 --- /dev/null +++ b/src/object/client/CGContainer.cpp @@ -0,0 +1,6 @@ +#include "object/client/CGContainer.hpp" +#include "object/client/CGItem.hpp" + +uint32_t CGContainer::TotalFieldsSaved() { + return CGItem::TotalFieldsSaved() + 72; +} diff --git a/src/object/client/CGContainer.hpp b/src/object/client/CGContainer.hpp new file mode 100644 index 0000000..0dd5506 --- /dev/null +++ b/src/object/client/CGContainer.hpp @@ -0,0 +1,16 @@ +#ifndef OBJECT_CLIENT_CG_CONTAINER_HPP +#define OBJECT_CLIENT_CG_CONTAINER_HPP + +#include + +struct CGContainerData { + // TODO +}; + +class CGContainer { + public: + // Public static functions + static uint32_t TotalFieldsSaved(); +}; + +#endif diff --git a/src/object/client/CGContainer_C.hpp b/src/object/client/CGContainer_C.hpp new file mode 100644 index 0000000..39eeae2 --- /dev/null +++ b/src/object/client/CGContainer_C.hpp @@ -0,0 +1,12 @@ +#ifndef OBJECT_CLIENT_CG_CONTAINER_C_HPP +#define OBJECT_CLIENT_CG_CONTAINER_C_HPP + +#include "object/client/CGContainer.hpp" +#include "object/client/CGItem_C.hpp" + +class CGContainer_C : public CGItem_C, public CGContainer { + public: + // TODO +}; + +#endif diff --git a/src/object/client/CGCorpse.cpp b/src/object/client/CGCorpse.cpp new file mode 100644 index 0000000..5ec8e10 --- /dev/null +++ b/src/object/client/CGCorpse.cpp @@ -0,0 +1,6 @@ +#include "object/client/CGCorpse.hpp" +#include "object/client/CGObject.hpp" + +uint32_t CGCorpse::TotalFieldsSaved() { + return CGObject::TotalFieldsSaved() + 3; +} diff --git a/src/object/client/CGCorpse.hpp b/src/object/client/CGCorpse.hpp new file mode 100644 index 0000000..99dfba8 --- /dev/null +++ b/src/object/client/CGCorpse.hpp @@ -0,0 +1,16 @@ +#ifndef OBJECT_CLIENT_CG_CORPSE_HPP +#define OBJECT_CLIENT_CG_CORPSE_HPP + +#include + +struct CGCorpseData { + // TODO +}; + +class CGCorpse { + public: + // Public static functions + static uint32_t TotalFieldsSaved(); +}; + +#endif diff --git a/src/object/client/CGCorpse_C.hpp b/src/object/client/CGCorpse_C.hpp new file mode 100644 index 0000000..df5d558 --- /dev/null +++ b/src/object/client/CGCorpse_C.hpp @@ -0,0 +1,12 @@ +#ifndef OBJECT_CLIENT_CG_CORPSE_C_HPP +#define OBJECT_CLIENT_CG_CORPSE_C_HPP + +#include "object/client/CGCorpse.hpp" +#include "object/client/CGObject_C.hpp" + +class CGCorpse_C : public CGObject_C, public CGCorpse { + public: + // TODO +}; + +#endif diff --git a/src/object/client/CGDynamicObject.cpp b/src/object/client/CGDynamicObject.cpp new file mode 100644 index 0000000..6fd1a88 --- /dev/null +++ b/src/object/client/CGDynamicObject.cpp @@ -0,0 +1,6 @@ +#include "object/client/CGDynamicObject.hpp" +#include "object/client/CGObject.hpp" + +uint32_t CGDynamicObject::TotalFieldsSaved() { + return CGObject::TotalFieldsSaved(); +} diff --git a/src/object/client/CGDynamicObject.hpp b/src/object/client/CGDynamicObject.hpp new file mode 100644 index 0000000..9c1d74d --- /dev/null +++ b/src/object/client/CGDynamicObject.hpp @@ -0,0 +1,16 @@ +#ifndef OBJECT_CLIENT_CG_DYNAMIC_OBJECT_HPP +#define OBJECT_CLIENT_CG_DYNAMIC_OBJECT_HPP + +#include + +struct CGDynamicObjectData { + // TODO +}; + +class CGDynamicObject { + public: + // Public static functions + static uint32_t TotalFieldsSaved(); +}; + +#endif diff --git a/src/object/client/CGDynamicObject_C.hpp b/src/object/client/CGDynamicObject_C.hpp new file mode 100644 index 0000000..6333b54 --- /dev/null +++ b/src/object/client/CGDynamicObject_C.hpp @@ -0,0 +1,12 @@ +#ifndef OBJECT_CLIENT_CG_DYNAMIC_OBJECT_C_HPP +#define OBJECT_CLIENT_CG_DYNAMIC_OBJECT_C_HPP + +#include "object/client/CGDynamicObject.hpp" +#include "object/client/CGObject_C.hpp" + +class CGDynamicObject_C : public CGObject_C, public CGDynamicObject { + public: + // TODO +}; + +#endif diff --git a/src/object/client/CGGameObject.cpp b/src/object/client/CGGameObject.cpp new file mode 100644 index 0000000..25377a5 --- /dev/null +++ b/src/object/client/CGGameObject.cpp @@ -0,0 +1,6 @@ +#include "object/client/CGGameObject.hpp" +#include "object/client/CGObject.hpp" + +uint32_t CGGameObject::TotalFieldsSaved() { + return CGObject::TotalFieldsSaved() + 4; +} diff --git a/src/object/client/CGGameObject.hpp b/src/object/client/CGGameObject.hpp new file mode 100644 index 0000000..6f78e6b --- /dev/null +++ b/src/object/client/CGGameObject.hpp @@ -0,0 +1,16 @@ +#ifndef OBJECT_CLIENT_CG_GAME_OBJECT_HPP +#define OBJECT_CLIENT_CG_GAME_OBJECT_HPP + +#include + +struct CGGameObjectData { + // TODO +}; + +class CGGameObject { + public: + // Public static functions + static uint32_t TotalFieldsSaved(); +}; + +#endif diff --git a/src/object/client/CGGameObject_C.hpp b/src/object/client/CGGameObject_C.hpp new file mode 100644 index 0000000..b3349a5 --- /dev/null +++ b/src/object/client/CGGameObject_C.hpp @@ -0,0 +1,12 @@ +#ifndef OBJECT_CLIENT_CG_GAME_OBJECT_C_HPP +#define OBJECT_CLIENT_CG_GAME_OBJECT_C_HPP + +#include "object/client/CGGameObject.hpp" +#include "object/client/CGObject_C.hpp" + +class CGGameObject_C : public CGObject_C, public CGGameObject { + public: + // TODO +}; + +#endif diff --git a/src/object/client/CGItem.cpp b/src/object/client/CGItem.cpp new file mode 100644 index 0000000..1f847e1 --- /dev/null +++ b/src/object/client/CGItem.cpp @@ -0,0 +1,6 @@ +#include "object/client/CGItem.hpp" +#include "object/client/CGObject.hpp" + +uint32_t CGItem::TotalFieldsSaved() { + return CGObject::TotalFieldsSaved() + 47; +} diff --git a/src/object/client/CGItem.hpp b/src/object/client/CGItem.hpp new file mode 100644 index 0000000..53ec968 --- /dev/null +++ b/src/object/client/CGItem.hpp @@ -0,0 +1,16 @@ +#ifndef OBJECT_CLIENT_CG_ITEM_HPP +#define OBJECT_CLIENT_CG_ITEM_HPP + +#include + +struct CGItemData { + // TODO +}; + +class CGItem { + public: + // Public static functions + static uint32_t TotalFieldsSaved(); +}; + +#endif diff --git a/src/object/client/CGItem_C.hpp b/src/object/client/CGItem_C.hpp new file mode 100644 index 0000000..842f7d0 --- /dev/null +++ b/src/object/client/CGItem_C.hpp @@ -0,0 +1,12 @@ +#ifndef OBJECT_CLIENT_CG_ITEM_C_HPP +#define OBJECT_CLIENT_CG_ITEM_C_HPP + +#include "object/client/CGObject_C.hpp" +#include "object/client/CGItem.hpp" + +class CGItem_C : public CGObject_C, public CGItem { + public: + // TODO +}; + +#endif diff --git a/src/object/client/CGObject.cpp b/src/object/client/CGObject.cpp new file mode 100644 index 0000000..da41804 --- /dev/null +++ b/src/object/client/CGObject.cpp @@ -0,0 +1,5 @@ +#include "object/client/CGObject.hpp" + +uint32_t CGObject::TotalFieldsSaved() { + return 3; +} diff --git a/src/object/client/CGObject.hpp b/src/object/client/CGObject.hpp new file mode 100644 index 0000000..a64ffcc --- /dev/null +++ b/src/object/client/CGObject.hpp @@ -0,0 +1,16 @@ +#ifndef OBJECT_CLIENT_CG_OBJECT_HPP +#define OBJECT_CLIENT_CG_OBJECT_HPP + +#include + +struct CGObjectData { + // TODO +}; + +class CGObject { + public: + // Public static functions + static uint32_t TotalFieldsSaved(); +}; + +#endif diff --git a/src/object/client/CGObject_C.hpp b/src/object/client/CGObject_C.hpp new file mode 100644 index 0000000..a1e4623 --- /dev/null +++ b/src/object/client/CGObject_C.hpp @@ -0,0 +1,13 @@ +#ifndef OBJECT_CLIENT_CG_OBJECT_C_HPP +#define OBJECT_CLIENT_CG_OBJECT_C_HPP + +#include "object/client/CGObject.hpp" +#include "util/CHashKeyGUID.hpp" +#include + +class CGObject_C : public CGObject, public TSHashObject { + public: + // TODO +}; + +#endif diff --git a/src/object/client/CGPlayer.cpp b/src/object/client/CGPlayer.cpp new file mode 100644 index 0000000..eb767dc --- /dev/null +++ b/src/object/client/CGPlayer.cpp @@ -0,0 +1,6 @@ +#include "object/client/CGPlayer.hpp" +#include "object/client/CGUnit.hpp" + +uint32_t CGPlayer::TotalFieldsSaved() { + return CGUnit::TotalFieldsSaved() + 173; +} diff --git a/src/object/client/CGPlayer.hpp b/src/object/client/CGPlayer.hpp new file mode 100644 index 0000000..11fe937 --- /dev/null +++ b/src/object/client/CGPlayer.hpp @@ -0,0 +1,16 @@ +#ifndef OBJECT_CLIENT_CG_PLAYER_HPP +#define OBJECT_CLIENT_CG_PLAYER_HPP + +#include + +struct CGPlayerData { + // TODO +}; + +class CGPlayer { + public: + // Public static functions + static uint32_t TotalFieldsSaved(); +}; + +#endif diff --git a/src/object/client/Player_C.cpp b/src/object/client/CGPlayer_C.cpp similarity index 97% rename from src/object/client/Player_C.cpp rename to src/object/client/CGPlayer_C.cpp index b34c593..978f3b3 100644 --- a/src/object/client/Player_C.cpp +++ b/src/object/client/CGPlayer_C.cpp @@ -1,4 +1,4 @@ -#include "object/client/Player_C.hpp" +#include "object/client/CGPlayer_C.hpp" #include "db/Db.hpp" #include "object/Types.hpp" #include diff --git a/src/object/client/CGPlayer_C.hpp b/src/object/client/CGPlayer_C.hpp new file mode 100644 index 0000000..cfe3c02 --- /dev/null +++ b/src/object/client/CGPlayer_C.hpp @@ -0,0 +1,19 @@ +#ifndef OBJECT_CLIENT_CG_PLAYER_C_HPP +#define OBJECT_CLIENT_CG_PLAYER_C_HPP + +#include "object/client/CGPlayer.hpp" +#include "object/client/CGUnit_C.hpp" +#include + +class CreatureModelDataRec; + +class CGPlayer_C : public CGUnit_C, public CGPlayer { + public: + // TODO +}; + +uint32_t Player_C_GetDisplayId(uint32_t race, uint32_t sex); + +const CreatureModelDataRec* Player_C_GetModelName(uint32_t race, uint32_t sex); + +#endif diff --git a/src/object/client/CGUnit.cpp b/src/object/client/CGUnit.cpp new file mode 100644 index 0000000..bcbdd86 --- /dev/null +++ b/src/object/client/CGUnit.cpp @@ -0,0 +1,6 @@ +#include "object/client/CGUnit.hpp" +#include "object/client/CGObject.hpp" + +uint32_t CGUnit::TotalFieldsSaved() { + return CGObject::TotalFieldsSaved() + 123; +} diff --git a/src/object/client/CGUnit.hpp b/src/object/client/CGUnit.hpp new file mode 100644 index 0000000..fe5a5e3 --- /dev/null +++ b/src/object/client/CGUnit.hpp @@ -0,0 +1,16 @@ +#ifndef OBJECT_CLIENT_CG_UNIT_HPP +#define OBJECT_CLIENT_CG_UNIT_HPP + +#include + +struct CGUnitData { + // TODO +}; + +class CGUnit { + public: + // Public static functions + static uint32_t TotalFieldsSaved(); +}; + +#endif diff --git a/src/object/client/Unit_C.cpp b/src/object/client/CGUnit_C.cpp similarity index 98% rename from src/object/client/Unit_C.cpp rename to src/object/client/CGUnit_C.cpp index 86e1f65..dad2f37 100644 --- a/src/object/client/Unit_C.cpp +++ b/src/object/client/CGUnit_C.cpp @@ -1,4 +1,4 @@ -#include "object/client/Unit_C.hpp" +#include "object/client/CGUnit_C.hpp" #include "db/Db.hpp" const char* CGUnit_C::GetDisplayClassNameFromRecord(const ChrClassesRec* classRec, UNIT_SEX sex, UNIT_SEX* displaySex) { diff --git a/src/object/client/Unit_C.hpp b/src/object/client/CGUnit_C.hpp similarity index 59% rename from src/object/client/Unit_C.hpp rename to src/object/client/CGUnit_C.hpp index 7c19443..6c0f17b 100644 --- a/src/object/client/Unit_C.hpp +++ b/src/object/client/CGUnit_C.hpp @@ -1,13 +1,16 @@ -#ifndef OBJECT_CLIENT_UNIT_C_HPP -#define OBJECT_CLIENT_UNIT_C_HPP +#ifndef OBJECT_CLIENT_CG_UNIT_C_HPP +#define OBJECT_CLIENT_CG_UNIT_C_HPP +#include "object/client/CGObject_C.hpp" +#include "object/client/CGUnit.hpp" #include "object/Types.hpp" class ChrClassesRec; class ChrRacesRec; -class CGUnit_C { +class CGUnit_C : public CGObject_C, public CGUnit { public: + // Public static functions static const char* GetDisplayClassNameFromRecord(const ChrClassesRec* classRec, UNIT_SEX sex, UNIT_SEX* displaySex); static const char* GetDisplayRaceNameFromRecord(const ChrRacesRec* raceRec, UNIT_SEX sex, UNIT_SEX* displaySex); }; diff --git a/src/object/client/Player_C.hpp b/src/object/client/Player_C.hpp deleted file mode 100644 index e3ef62b..0000000 --- a/src/object/client/Player_C.hpp +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef OBJECT_CLIENT_PLAYER_C_HPP -#define OBJECT_CLIENT_PLAYER_C_HPP - -#include - -class CreatureModelDataRec; - -uint32_t Player_C_GetDisplayId(uint32_t race, uint32_t sex); - -const CreatureModelDataRec* Player_C_GetModelName(uint32_t race, uint32_t sex); - -#endif diff --git a/src/util/CHashKeyGUID.cpp b/src/util/CHashKeyGUID.cpp new file mode 100644 index 0000000..efcaef2 --- /dev/null +++ b/src/util/CHashKeyGUID.cpp @@ -0,0 +1,9 @@ +#include "util/CHashKeyGUID.hpp" + +CHashKeyGUID::CHashKeyGUID() { + this->m_guid = 0; +} + +CHashKeyGUID::CHashKeyGUID(uint64_t guid) { + this->m_guid = guid; +} diff --git a/src/util/CHashKeyGUID.hpp b/src/util/CHashKeyGUID.hpp new file mode 100644 index 0000000..be0a8cb --- /dev/null +++ b/src/util/CHashKeyGUID.hpp @@ -0,0 +1,17 @@ +#ifndef UTIL_C_HASH_KEY_GUID_HPP +#define UTIL_C_HASH_KEY_GUID_HPP + +#include + +class CHashKeyGUID { + public: + // Public member functions + CHashKeyGUID(); + CHashKeyGUID(uint64_t guid); + + private: + // Private member variables + uint64_t m_guid; +}; + +#endif