mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 16:22:45 +03:00
feat(object): add initial structure for basic client object classes
This commit is contained in:
parent
766d849d79
commit
267890cafe
@ -7,7 +7,7 @@
|
|||||||
#include "glue/CGlueLoading.hpp"
|
#include "glue/CGlueLoading.hpp"
|
||||||
#include "model/CM2Shared.hpp"
|
#include "model/CM2Shared.hpp"
|
||||||
#include "net/Connection.hpp"
|
#include "net/Connection.hpp"
|
||||||
#include "object/client/Player_C.hpp"
|
#include "object/client/CGPlayer_C.hpp"
|
||||||
#include "ui/simple/CSimpleModelFFX.hpp"
|
#include "ui/simple/CSimpleModelFFX.hpp"
|
||||||
#include "util/Random.hpp"
|
#include "util/Random.hpp"
|
||||||
#include <tempest/Random.hpp>
|
#include <tempest/Random.hpp>
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
#include "db/Db.hpp"
|
#include "db/Db.hpp"
|
||||||
#include "glue/CCharacterCreation.hpp"
|
#include "glue/CCharacterCreation.hpp"
|
||||||
#include "net/Connection.hpp"
|
#include "net/Connection.hpp"
|
||||||
#include "object/client/Unit_C.hpp"
|
#include "object/client/CGUnit_C.hpp"
|
||||||
#include "ui/FrameScript.hpp"
|
#include "ui/FrameScript.hpp"
|
||||||
#include "ui/Types.hpp"
|
#include "ui/Types.hpp"
|
||||||
#include "ui/game/CGLookingForGroup.hpp"
|
#include "ui/game/CGLookingForGroup.hpp"
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#include "glue/CCharacterSelectionScript.hpp"
|
#include "glue/CCharacterSelectionScript.hpp"
|
||||||
#include "db/Db.hpp"
|
#include "db/Db.hpp"
|
||||||
#include "glue/CCharacterSelection.hpp"
|
#include "glue/CCharacterSelection.hpp"
|
||||||
#include "object/client/Unit_C.hpp"
|
#include "object/client/CGUnit_C.hpp"
|
||||||
#include "ui/Types.hpp"
|
#include "ui/Types.hpp"
|
||||||
#include "ui/simple/CSimpleModelFFX.hpp"
|
#include "ui/simple/CSimpleModelFFX.hpp"
|
||||||
#include "util/Lua.hpp"
|
#include "util/Lua.hpp"
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
#include "component/CCharacterComponent.hpp"
|
#include "component/CCharacterComponent.hpp"
|
||||||
#include "db/Db.hpp"
|
#include "db/Db.hpp"
|
||||||
#include "glue/CCharacterSelection.hpp"
|
#include "glue/CCharacterSelection.hpp"
|
||||||
#include "object/client/Player_C.hpp"
|
#include "object/client/CGPlayer_C.hpp"
|
||||||
#include "ui/simple/CSimpleModelFFX.hpp"
|
#include "ui/simple/CSimpleModelFFX.hpp"
|
||||||
|
|
||||||
CharacterSelectionDisplay::~CharacterSelectionDisplay() {
|
CharacterSelectionDisplay::~CharacterSelectionDisplay() {
|
||||||
|
|||||||
6
src/object/client/CGContainer.cpp
Normal file
6
src/object/client/CGContainer.cpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include "object/client/CGContainer.hpp"
|
||||||
|
#include "object/client/CGItem.hpp"
|
||||||
|
|
||||||
|
uint32_t CGContainer::TotalFieldsSaved() {
|
||||||
|
return CGItem::TotalFieldsSaved() + 72;
|
||||||
|
}
|
||||||
16
src/object/client/CGContainer.hpp
Normal file
16
src/object/client/CGContainer.hpp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#ifndef OBJECT_CLIENT_CG_CONTAINER_HPP
|
||||||
|
#define OBJECT_CLIENT_CG_CONTAINER_HPP
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
struct CGContainerData {
|
||||||
|
// TODO
|
||||||
|
};
|
||||||
|
|
||||||
|
class CGContainer {
|
||||||
|
public:
|
||||||
|
// Public static functions
|
||||||
|
static uint32_t TotalFieldsSaved();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
12
src/object/client/CGContainer_C.hpp
Normal file
12
src/object/client/CGContainer_C.hpp
Normal file
@ -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
|
||||||
6
src/object/client/CGCorpse.cpp
Normal file
6
src/object/client/CGCorpse.cpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include "object/client/CGCorpse.hpp"
|
||||||
|
#include "object/client/CGObject.hpp"
|
||||||
|
|
||||||
|
uint32_t CGCorpse::TotalFieldsSaved() {
|
||||||
|
return CGObject::TotalFieldsSaved() + 3;
|
||||||
|
}
|
||||||
16
src/object/client/CGCorpse.hpp
Normal file
16
src/object/client/CGCorpse.hpp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#ifndef OBJECT_CLIENT_CG_CORPSE_HPP
|
||||||
|
#define OBJECT_CLIENT_CG_CORPSE_HPP
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
struct CGCorpseData {
|
||||||
|
// TODO
|
||||||
|
};
|
||||||
|
|
||||||
|
class CGCorpse {
|
||||||
|
public:
|
||||||
|
// Public static functions
|
||||||
|
static uint32_t TotalFieldsSaved();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
12
src/object/client/CGCorpse_C.hpp
Normal file
12
src/object/client/CGCorpse_C.hpp
Normal file
@ -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
|
||||||
6
src/object/client/CGDynamicObject.cpp
Normal file
6
src/object/client/CGDynamicObject.cpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include "object/client/CGDynamicObject.hpp"
|
||||||
|
#include "object/client/CGObject.hpp"
|
||||||
|
|
||||||
|
uint32_t CGDynamicObject::TotalFieldsSaved() {
|
||||||
|
return CGObject::TotalFieldsSaved();
|
||||||
|
}
|
||||||
16
src/object/client/CGDynamicObject.hpp
Normal file
16
src/object/client/CGDynamicObject.hpp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#ifndef OBJECT_CLIENT_CG_DYNAMIC_OBJECT_HPP
|
||||||
|
#define OBJECT_CLIENT_CG_DYNAMIC_OBJECT_HPP
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
struct CGDynamicObjectData {
|
||||||
|
// TODO
|
||||||
|
};
|
||||||
|
|
||||||
|
class CGDynamicObject {
|
||||||
|
public:
|
||||||
|
// Public static functions
|
||||||
|
static uint32_t TotalFieldsSaved();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
12
src/object/client/CGDynamicObject_C.hpp
Normal file
12
src/object/client/CGDynamicObject_C.hpp
Normal file
@ -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
|
||||||
6
src/object/client/CGGameObject.cpp
Normal file
6
src/object/client/CGGameObject.cpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include "object/client/CGGameObject.hpp"
|
||||||
|
#include "object/client/CGObject.hpp"
|
||||||
|
|
||||||
|
uint32_t CGGameObject::TotalFieldsSaved() {
|
||||||
|
return CGObject::TotalFieldsSaved() + 4;
|
||||||
|
}
|
||||||
16
src/object/client/CGGameObject.hpp
Normal file
16
src/object/client/CGGameObject.hpp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#ifndef OBJECT_CLIENT_CG_GAME_OBJECT_HPP
|
||||||
|
#define OBJECT_CLIENT_CG_GAME_OBJECT_HPP
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
struct CGGameObjectData {
|
||||||
|
// TODO
|
||||||
|
};
|
||||||
|
|
||||||
|
class CGGameObject {
|
||||||
|
public:
|
||||||
|
// Public static functions
|
||||||
|
static uint32_t TotalFieldsSaved();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
12
src/object/client/CGGameObject_C.hpp
Normal file
12
src/object/client/CGGameObject_C.hpp
Normal file
@ -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
|
||||||
6
src/object/client/CGItem.cpp
Normal file
6
src/object/client/CGItem.cpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include "object/client/CGItem.hpp"
|
||||||
|
#include "object/client/CGObject.hpp"
|
||||||
|
|
||||||
|
uint32_t CGItem::TotalFieldsSaved() {
|
||||||
|
return CGObject::TotalFieldsSaved() + 47;
|
||||||
|
}
|
||||||
16
src/object/client/CGItem.hpp
Normal file
16
src/object/client/CGItem.hpp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#ifndef OBJECT_CLIENT_CG_ITEM_HPP
|
||||||
|
#define OBJECT_CLIENT_CG_ITEM_HPP
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
struct CGItemData {
|
||||||
|
// TODO
|
||||||
|
};
|
||||||
|
|
||||||
|
class CGItem {
|
||||||
|
public:
|
||||||
|
// Public static functions
|
||||||
|
static uint32_t TotalFieldsSaved();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
12
src/object/client/CGItem_C.hpp
Normal file
12
src/object/client/CGItem_C.hpp
Normal file
@ -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
|
||||||
5
src/object/client/CGObject.cpp
Normal file
5
src/object/client/CGObject.cpp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#include "object/client/CGObject.hpp"
|
||||||
|
|
||||||
|
uint32_t CGObject::TotalFieldsSaved() {
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
16
src/object/client/CGObject.hpp
Normal file
16
src/object/client/CGObject.hpp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#ifndef OBJECT_CLIENT_CG_OBJECT_HPP
|
||||||
|
#define OBJECT_CLIENT_CG_OBJECT_HPP
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
struct CGObjectData {
|
||||||
|
// TODO
|
||||||
|
};
|
||||||
|
|
||||||
|
class CGObject {
|
||||||
|
public:
|
||||||
|
// Public static functions
|
||||||
|
static uint32_t TotalFieldsSaved();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
13
src/object/client/CGObject_C.hpp
Normal file
13
src/object/client/CGObject_C.hpp
Normal file
@ -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 <storm/Hash.hpp>
|
||||||
|
|
||||||
|
class CGObject_C : public CGObject, public TSHashObject<CGObject_C, CHashKeyGUID> {
|
||||||
|
public:
|
||||||
|
// TODO
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
6
src/object/client/CGPlayer.cpp
Normal file
6
src/object/client/CGPlayer.cpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include "object/client/CGPlayer.hpp"
|
||||||
|
#include "object/client/CGUnit.hpp"
|
||||||
|
|
||||||
|
uint32_t CGPlayer::TotalFieldsSaved() {
|
||||||
|
return CGUnit::TotalFieldsSaved() + 173;
|
||||||
|
}
|
||||||
16
src/object/client/CGPlayer.hpp
Normal file
16
src/object/client/CGPlayer.hpp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#ifndef OBJECT_CLIENT_CG_PLAYER_HPP
|
||||||
|
#define OBJECT_CLIENT_CG_PLAYER_HPP
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
struct CGPlayerData {
|
||||||
|
// TODO
|
||||||
|
};
|
||||||
|
|
||||||
|
class CGPlayer {
|
||||||
|
public:
|
||||||
|
// Public static functions
|
||||||
|
static uint32_t TotalFieldsSaved();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@ -1,4 +1,4 @@
|
|||||||
#include "object/client/Player_C.hpp"
|
#include "object/client/CGPlayer_C.hpp"
|
||||||
#include "db/Db.hpp"
|
#include "db/Db.hpp"
|
||||||
#include "object/Types.hpp"
|
#include "object/Types.hpp"
|
||||||
#include <storm/Error.hpp>
|
#include <storm/Error.hpp>
|
||||||
19
src/object/client/CGPlayer_C.hpp
Normal file
19
src/object/client/CGPlayer_C.hpp
Normal file
@ -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 <cstdint>
|
||||||
|
|
||||||
|
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
|
||||||
6
src/object/client/CGUnit.cpp
Normal file
6
src/object/client/CGUnit.cpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include "object/client/CGUnit.hpp"
|
||||||
|
#include "object/client/CGObject.hpp"
|
||||||
|
|
||||||
|
uint32_t CGUnit::TotalFieldsSaved() {
|
||||||
|
return CGObject::TotalFieldsSaved() + 123;
|
||||||
|
}
|
||||||
16
src/object/client/CGUnit.hpp
Normal file
16
src/object/client/CGUnit.hpp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#ifndef OBJECT_CLIENT_CG_UNIT_HPP
|
||||||
|
#define OBJECT_CLIENT_CG_UNIT_HPP
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
struct CGUnitData {
|
||||||
|
// TODO
|
||||||
|
};
|
||||||
|
|
||||||
|
class CGUnit {
|
||||||
|
public:
|
||||||
|
// Public static functions
|
||||||
|
static uint32_t TotalFieldsSaved();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@ -1,4 +1,4 @@
|
|||||||
#include "object/client/Unit_C.hpp"
|
#include "object/client/CGUnit_C.hpp"
|
||||||
#include "db/Db.hpp"
|
#include "db/Db.hpp"
|
||||||
|
|
||||||
const char* CGUnit_C::GetDisplayClassNameFromRecord(const ChrClassesRec* classRec, UNIT_SEX sex, UNIT_SEX* displaySex) {
|
const char* CGUnit_C::GetDisplayClassNameFromRecord(const ChrClassesRec* classRec, UNIT_SEX sex, UNIT_SEX* displaySex) {
|
||||||
@ -1,13 +1,16 @@
|
|||||||
#ifndef OBJECT_CLIENT_UNIT_C_HPP
|
#ifndef OBJECT_CLIENT_CG_UNIT_C_HPP
|
||||||
#define OBJECT_CLIENT_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"
|
#include "object/Types.hpp"
|
||||||
|
|
||||||
class ChrClassesRec;
|
class ChrClassesRec;
|
||||||
class ChrRacesRec;
|
class ChrRacesRec;
|
||||||
|
|
||||||
class CGUnit_C {
|
class CGUnit_C : public CGObject_C, public CGUnit {
|
||||||
public:
|
public:
|
||||||
|
// Public static functions
|
||||||
static const char* GetDisplayClassNameFromRecord(const ChrClassesRec* classRec, UNIT_SEX sex, UNIT_SEX* displaySex);
|
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);
|
static const char* GetDisplayRaceNameFromRecord(const ChrRacesRec* raceRec, UNIT_SEX sex, UNIT_SEX* displaySex);
|
||||||
};
|
};
|
||||||
@ -1,12 +0,0 @@
|
|||||||
#ifndef OBJECT_CLIENT_PLAYER_C_HPP
|
|
||||||
#define OBJECT_CLIENT_PLAYER_C_HPP
|
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
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
|
|
||||||
9
src/util/CHashKeyGUID.cpp
Normal file
9
src/util/CHashKeyGUID.cpp
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#include "util/CHashKeyGUID.hpp"
|
||||||
|
|
||||||
|
CHashKeyGUID::CHashKeyGUID() {
|
||||||
|
this->m_guid = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
CHashKeyGUID::CHashKeyGUID(uint64_t guid) {
|
||||||
|
this->m_guid = guid;
|
||||||
|
}
|
||||||
17
src/util/CHashKeyGUID.hpp
Normal file
17
src/util/CHashKeyGUID.hpp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#ifndef UTIL_C_HASH_KEY_GUID_HPP
|
||||||
|
#define UTIL_C_HASH_KEY_GUID_HPP
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
class CHashKeyGUID {
|
||||||
|
public:
|
||||||
|
// Public member functions
|
||||||
|
CHashKeyGUID();
|
||||||
|
CHashKeyGUID(uint64_t guid);
|
||||||
|
|
||||||
|
private:
|
||||||
|
// Private member variables
|
||||||
|
uint64_t m_guid;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
Loading…
Reference in New Issue
Block a user