mirror of
https://github.com/whoahq/whoa.git
synced 2026-11-07 07:09:53 +03:00
feat(object): add CGObject_C::SetBlock
This commit is contained in:
2 files changed
+6
No files matched your search
@@ -1,5 +1,10 @@
|
||||
#include "object/client/CGObject_C.hpp"
|
||||
|
||||
void CGObject_C::SetBlock(uint32_t block, uint32_t value) {
|
||||
auto storage = reinterpret_cast<uint32_t*>(this->m_obj);
|
||||
storage[block] = value;
|
||||
}
|
||||
|
||||
void CGObject_C::SetStorage(uint32_t* storage, uint32_t* saved) {
|
||||
this->m_obj = reinterpret_cast<CGObjectData*>(&storage[CGObject::GetBaseOffset()]);
|
||||
this->m_objSaved = &saved[CGObject::GetBaseOffsetSaved()];
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
class CGObject_C : public CGObject, public TSHashObject<CGObject_C, CHashKeyGUID> {
|
||||
public:
|
||||
// Public member functions
|
||||
void SetBlock(uint32_t block, uint32_t value);
|
||||
void SetStorage(uint32_t* storage, uint32_t* saved);
|
||||
void SetTypeID(OBJECT_TYPE_ID typeID);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user