diff --git a/src/object/client/MessageHandlers.cpp b/src/object/client/MessageHandlers.cpp new file mode 100644 index 0000000..667d3a4 --- /dev/null +++ b/src/object/client/MessageHandlers.cpp @@ -0,0 +1,15 @@ +#include "object/client/MessageHandlers.hpp" +#include "util/Unimplemented.hpp" +#include + +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); +} diff --git a/src/object/client/MessageHandlers.hpp b/src/object/client/MessageHandlers.hpp new file mode 100644 index 0000000..08fa902 --- /dev/null +++ b/src/object/client/MessageHandlers.hpp @@ -0,0 +1,15 @@ +#ifndef OBJECT_CLIENT_MESSAGE_HANDLERS_HPP +#define OBJECT_CLIENT_MESSAGE_HANDLERS_HPP + +#include "net/Types.hpp" +#include + +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 diff --git a/src/object/client/ObjMgr.cpp b/src/object/client/ObjMgr.cpp index 88bbcbf..e1c05ad 100644 --- a/src/object/client/ObjMgr.cpp +++ b/src/object/client/ObjMgr.cpp @@ -10,6 +10,7 @@ #include "object/client/CGObject_C.hpp" #include "object/client/CGPlayer_C.hpp" #include "object/client/CGUnit_C.hpp" +#include "object/client/MessageHandlers.hpp" #include "util/Unimplemented.hpp" #include #include @@ -133,5 +134,7 @@ void ClntObjMgrPush(ClntObjMgr* mgr) { } 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); }