feat(object): add CGObject_C::SetBlock

This commit is contained in:
fallenoak 2026-01-11 22:36:12 -06:00
parent 8066b4c053
commit 9162978b4f
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
2 changed files with 6 additions and 0 deletions

View File

@ -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()];

View File

@ -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);
};