feat(object): add ClntObjMgrInitializeStd

This commit is contained in:
fallenoak committed 2026-01-05 22:57:32 -06:00
1 parent a28a0588fc
commit eee2986220
3 files changed
+31

No files matched your search

+22
View File
@@ -1,4 +1,7 @@
#include "object/client/ObjMgr.hpp"
#include "client/ClientServices.hpp"
#include "net/Connection.hpp"
#include <storm/Memory.hpp>
#if defined(WHOA_SYSTEM_WIN)
static thread_local ClntObjMgr* s_curMgr;
@@ -16,6 +19,21 @@ uint32_t ClntObjMgrGetMapID() {
return s_curMgr->m_mapID;
}
void ClntObjMgrInitializeStd(uint32_t mapID) {
// TODO last instance time
auto mgr = STORM_NEW(ClntObjMgr);
g_clientConnection->SetObjMgr(mgr);
mgr->m_net = g_clientConnection;
s_curMgr = mgr;
ClntObjMgrSetHandlers();
mgr->m_mapID = mapID;
}
void ClntObjMgrPop() {
if (!s_savMgr) {
return;
@@ -33,3 +51,7 @@ void ClntObjMgrPush(ClntObjMgr* mgr) {
s_savMgr = s_curMgr;
s_curMgr = mgr;
}
void ClntObjMgrSetHandlers() {
// TODO
}
+4
View File
@@ -6,8 +6,12 @@
uint32_t ClntObjMgrGetMapID();
void ClntObjMgrInitializeStd(uint32_t mapID);
void ClntObjMgrPop();
void ClntObjMgrPush(ClntObjMgr* mgr);
void ClntObjMgrSetHandlers();
#endif