mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-02 08:42:45 +03:00
feat(object): implement ClntObjMgrGetMapID
This commit is contained in:
parent
c6eef57289
commit
35787c4ac8
16
src/object/client/ClntObjMgr.hpp
Normal file
16
src/object/client/ClntObjMgr.hpp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#ifndef OBJECT_CLIENT_CLNT_OBJ_MGR_HPP
|
||||||
|
#define OBJECT_CLIENT_CLNT_OBJ_MGR_HPP
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
class ClientConnection;
|
||||||
|
|
||||||
|
class ClntObjMgr {
|
||||||
|
public:
|
||||||
|
// Member variables
|
||||||
|
uint64_t m_activePlayer = 0;
|
||||||
|
uint32_t m_mapID = 0;
|
||||||
|
ClientConnection* m_net = nullptr;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@ -1,6 +1,16 @@
|
|||||||
#include "object/client/ObjMgr.hpp"
|
#include "object/client/ObjMgr.hpp"
|
||||||
|
#include "object/client/ClntObjMgr.hpp"
|
||||||
|
|
||||||
|
#if defined(WHOA_SYSTEM_WIN)
|
||||||
|
static thread_local ClntObjMgr* s_curMgr;
|
||||||
|
#else
|
||||||
|
static ClntObjMgr* s_curMgr;
|
||||||
|
#endif
|
||||||
|
|
||||||
uint32_t ClntObjMgrGetMapID() {
|
uint32_t ClntObjMgrGetMapID() {
|
||||||
// TODO
|
if (!s_curMgr) {
|
||||||
return -1;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return s_curMgr->m_mapID;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#ifndef OBJECT_CLIENT_CLIENT_OBJ_MGR_HPP
|
#ifndef OBJECT_CLIENT_OBJ_MGR_HPP
|
||||||
#define OBJECT_CLIENT_CLIENT_OBJ_MGR_HPP
|
#define OBJECT_CLIENT_OBJ_MGR_HPP
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user