mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-05 15:42:17 +03:00
feat(object): add ClntObjMgrGetPlayerType
This commit is contained in:
parent
61303b51a2
commit
5b88141acb
@ -78,6 +78,11 @@ enum OUT_OF_RANGE_TYPE {
|
|||||||
OUT_OF_RANGE_2 = 2,
|
OUT_OF_RANGE_2 = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum PLAYER_TYPE {
|
||||||
|
PLAYER_NORMAL = 0,
|
||||||
|
PLAYER_BOT = 1,
|
||||||
|
};
|
||||||
|
|
||||||
enum SHEATHE_TYPE {
|
enum SHEATHE_TYPE {
|
||||||
SHEATHE_0 = 0,
|
SHEATHE_0 = 0,
|
||||||
SHEATHE_1 = 1,
|
SHEATHE_1 = 1,
|
||||||
|
|||||||
@ -18,8 +18,12 @@ class ClntObjMgr {
|
|||||||
STORM_EXPLICIT_LIST(CGObject_C, m_link) m_reenabledObjects;
|
STORM_EXPLICIT_LIST(CGObject_C, m_link) m_reenabledObjects;
|
||||||
// TODO
|
// TODO
|
||||||
WOWGUID m_activePlayer = 0;
|
WOWGUID m_activePlayer = 0;
|
||||||
|
PLAYER_TYPE m_type;
|
||||||
uint32_t m_mapID = 0;
|
uint32_t m_mapID = 0;
|
||||||
ClientConnection* m_net = nullptr;
|
ClientConnection* m_net = nullptr;
|
||||||
|
|
||||||
|
// Member functions
|
||||||
|
ClntObjMgr(PLAYER_TYPE type) : m_type(type) {};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -141,6 +141,10 @@ uint32_t ClntObjMgrGetMapID() {
|
|||||||
return s_curMgr->m_mapID;
|
return s_curMgr->m_mapID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PLAYER_TYPE ClntObjMgrGetPlayerType() {
|
||||||
|
return s_curMgr->m_type;
|
||||||
|
}
|
||||||
|
|
||||||
void ClntObjMgrInitializeShared() {
|
void ClntObjMgrInitializeShared() {
|
||||||
if (!s_heapsAllocated) {
|
if (!s_heapsAllocated) {
|
||||||
for (int32_t i = ID_ITEM; i < NUM_CLIENT_OBJECT_TYPES; i++) {
|
for (int32_t i = ID_ITEM; i < NUM_CLIENT_OBJECT_TYPES; i++) {
|
||||||
@ -158,7 +162,7 @@ void ClntObjMgrInitializeShared() {
|
|||||||
void ClntObjMgrInitializeStd(uint32_t mapID) {
|
void ClntObjMgrInitializeStd(uint32_t mapID) {
|
||||||
// TODO last instance time
|
// TODO last instance time
|
||||||
|
|
||||||
auto mgr = STORM_NEW(ClntObjMgr);
|
auto mgr = STORM_NEW(ClntObjMgr)(PLAYER_NORMAL);
|
||||||
|
|
||||||
g_clientConnection->SetObjMgr(mgr);
|
g_clientConnection->SetObjMgr(mgr);
|
||||||
mgr->m_net = g_clientConnection;
|
mgr->m_net = g_clientConnection;
|
||||||
|
|||||||
@ -16,6 +16,8 @@ ClntObjMgr* ClntObjMgrGetCurrent();
|
|||||||
|
|
||||||
uint32_t ClntObjMgrGetMapID();
|
uint32_t ClntObjMgrGetMapID();
|
||||||
|
|
||||||
|
PLAYER_TYPE ClntObjMgrGetPlayerType();
|
||||||
|
|
||||||
void ClntObjMgrInitializeShared();
|
void ClntObjMgrInitializeShared();
|
||||||
|
|
||||||
void ClntObjMgrInitializeStd(uint32_t mapID);
|
void ClntObjMgrInitializeStd(uint32_t mapID);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user