mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
feat(object): add CGObject_C::SetBlock
This commit is contained in:
parent
8066b4c053
commit
9162978b4f
@ -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);
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user