mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-02 00:32:45 +03:00
feat(object): implement ClntObjMgrSetHandlers
This commit is contained in:
parent
a93d9a7964
commit
be97e9ace8
15
src/object/client/MessageHandlers.cpp
Normal file
15
src/object/client/MessageHandlers.cpp
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#include "object/client/MessageHandlers.hpp"
|
||||||
|
#include "util/Unimplemented.hpp"
|
||||||
|
#include <common/DataStore.hpp>
|
||||||
|
|
||||||
|
int32_t ObjectCompressedUpdateHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t ObjectUpdateHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t OnObjectDestroy(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
|
||||||
|
WHOA_UNIMPLEMENTED(0);
|
||||||
|
}
|
||||||
15
src/object/client/MessageHandlers.hpp
Normal file
15
src/object/client/MessageHandlers.hpp
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#ifndef OBJECT_CLIENT_MESSAGE_HANDLERS_HPP
|
||||||
|
#define OBJECT_CLIENT_MESSAGE_HANDLERS_HPP
|
||||||
|
|
||||||
|
#include "net/Types.hpp"
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
class CDataStore;
|
||||||
|
|
||||||
|
int32_t ObjectCompressedUpdateHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
|
||||||
|
|
||||||
|
int32_t ObjectUpdateHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
|
||||||
|
|
||||||
|
int32_t OnObjectDestroy(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
|
||||||
|
|
||||||
|
#endif
|
||||||
@ -10,6 +10,7 @@
|
|||||||
#include "object/client/CGObject_C.hpp"
|
#include "object/client/CGObject_C.hpp"
|
||||||
#include "object/client/CGPlayer_C.hpp"
|
#include "object/client/CGPlayer_C.hpp"
|
||||||
#include "object/client/CGUnit_C.hpp"
|
#include "object/client/CGUnit_C.hpp"
|
||||||
|
#include "object/client/MessageHandlers.hpp"
|
||||||
#include "util/Unimplemented.hpp"
|
#include "util/Unimplemented.hpp"
|
||||||
#include <common/ObjectAlloc.hpp>
|
#include <common/ObjectAlloc.hpp>
|
||||||
#include <storm/Memory.hpp>
|
#include <storm/Memory.hpp>
|
||||||
@ -133,5 +134,7 @@ void ClntObjMgrPush(ClntObjMgr* mgr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ClntObjMgrSetHandlers() {
|
void ClntObjMgrSetHandlers() {
|
||||||
// TODO
|
s_curMgr->m_net->SetMessageHandler(SMSG_UPDATE_OBJECT, &ObjectUpdateHandler, nullptr);
|
||||||
|
s_curMgr->m_net->SetMessageHandler(SMSG_COMPRESSED_UPDATE_OBJECT, &ObjectCompressedUpdateHandler, nullptr);
|
||||||
|
s_curMgr->m_net->SetMessageHandler(SMSG_DESTROY_OBJECT, &OnObjectDestroy, nullptr);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user