mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
chore(object): move GetUpdateObject to util
This commit is contained in:
parent
8615757d54
commit
d18a479bfb
@ -28,21 +28,6 @@ enum UPDATE_TYPE {
|
||||
UPDATE_IN_RANGE = 5,
|
||||
};
|
||||
|
||||
CGObject_C* GetUpdateObject(WOWGUID guid, int32_t* reenabled) {
|
||||
*reenabled = false;
|
||||
|
||||
auto activeObject = FindActiveObject(guid);
|
||||
|
||||
if (activeObject) {
|
||||
activeObject->SetDisablePending(false);
|
||||
|
||||
return activeObject;
|
||||
}
|
||||
|
||||
// TODO handle reenabling object
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int32_t SkipPartialObjectUpdate(CDataStore* msg) {
|
||||
// TODO
|
||||
return 0;
|
||||
|
||||
@ -4,3 +4,18 @@
|
||||
CGObject_C* FindActiveObject(WOWGUID guid) {
|
||||
return ClntObjMgrGetCurrent()->m_objects.Ptr(guid, CHashKeyGUID(guid));
|
||||
}
|
||||
|
||||
CGObject_C* GetUpdateObject(WOWGUID guid, int32_t* reenabled) {
|
||||
*reenabled = false;
|
||||
|
||||
auto activeObject = FindActiveObject(guid);
|
||||
|
||||
if (activeObject) {
|
||||
activeObject->SetDisablePending(false);
|
||||
|
||||
return activeObject;
|
||||
}
|
||||
|
||||
// TODO handle reenabling object
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -2,9 +2,12 @@
|
||||
#define OBJECT_CLIENT_UTIL_HPP
|
||||
|
||||
#include "util/GUID.hpp"
|
||||
#include <cstdint>
|
||||
|
||||
class CGObject_C;
|
||||
|
||||
CGObject_C* FindActiveObject(WOWGUID guid);
|
||||
|
||||
CGObject_C* GetUpdateObject(WOWGUID guid, int32_t* reenabled);
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user