mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-02 16:52:45 +03:00
Compare commits
1 Commits
ac22544261
...
29c48900d7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29c48900d7 |
@ -8,14 +8,6 @@ CGCorpse_C::~CGCorpse_C() {
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGCorpse_C::PostInit(uint32_t time, const CClientObjCreate& init, bool a4) {
|
|
||||||
// TODO
|
|
||||||
|
|
||||||
this->CGObject_C::PostInit(time, init, a4);
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGCorpse_C::SetStorage(uint32_t* storage, uint32_t* saved) {
|
void CGCorpse_C::SetStorage(uint32_t* storage, uint32_t* saved) {
|
||||||
this->CGObject_C::SetStorage(storage, saved);
|
this->CGObject_C::SetStorage(storage, saved);
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,6 @@ class CGCorpse_C : public CGObject_C, public CGCorpse {
|
|||||||
|
|
||||||
// Public member functions
|
// Public member functions
|
||||||
CGCorpse_C(uint32_t time, CClientObjCreate& objCreate);
|
CGCorpse_C(uint32_t time, CClientObjCreate& objCreate);
|
||||||
void PostInit(uint32_t time, const CClientObjCreate& init, bool a4);
|
|
||||||
void SetStorage(uint32_t* storage, uint32_t* saved);
|
void SetStorage(uint32_t* storage, uint32_t* saved);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -8,14 +8,6 @@ CGDynamicObject_C::~CGDynamicObject_C() {
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGDynamicObject_C::PostInit(uint32_t time, const CClientObjCreate& init, bool a4) {
|
|
||||||
// TODO
|
|
||||||
|
|
||||||
this->CGObject_C::PostInit(time, init, a4);
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGDynamicObject_C::SetStorage(uint32_t* storage, uint32_t* saved) {
|
void CGDynamicObject_C::SetStorage(uint32_t* storage, uint32_t* saved) {
|
||||||
this->CGObject_C::SetStorage(storage, saved);
|
this->CGObject_C::SetStorage(storage, saved);
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,6 @@ class CGDynamicObject_C : public CGObject_C, public CGDynamicObject {
|
|||||||
|
|
||||||
// Public member functions
|
// Public member functions
|
||||||
CGDynamicObject_C(uint32_t time, CClientObjCreate& objCreate);
|
CGDynamicObject_C(uint32_t time, CClientObjCreate& objCreate);
|
||||||
void PostInit(uint32_t time, const CClientObjCreate& init, bool a4);
|
|
||||||
void SetStorage(uint32_t* storage, uint32_t* saved);
|
void SetStorage(uint32_t* storage, uint32_t* saved);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -8,14 +8,6 @@ CGGameObject_C::~CGGameObject_C() {
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGGameObject_C::PostInit(uint32_t time, const CClientObjCreate& init, bool a4) {
|
|
||||||
// TODO
|
|
||||||
|
|
||||||
this->CGObject_C::PostInit(time, init, a4);
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGGameObject_C::SetStorage(uint32_t* storage, uint32_t* saved) {
|
void CGGameObject_C::SetStorage(uint32_t* storage, uint32_t* saved) {
|
||||||
this->CGObject_C::SetStorage(storage, saved);
|
this->CGObject_C::SetStorage(storage, saved);
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,6 @@ class CGGameObject_C : public CGObject_C, public CGGameObject {
|
|||||||
|
|
||||||
// Public member functions
|
// Public member functions
|
||||||
CGGameObject_C(uint32_t time, CClientObjCreate& objCreate);
|
CGGameObject_C(uint32_t time, CClientObjCreate& objCreate);
|
||||||
void PostInit(uint32_t time, const CClientObjCreate& init, bool a4);
|
|
||||||
void SetStorage(uint32_t* storage, uint32_t* saved);
|
void SetStorage(uint32_t* storage, uint32_t* saved);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -8,12 +8,6 @@ CGItem_C::~CGItem_C() {
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGItem_C::PostInit(uint32_t time, const CClientObjCreate& init, bool a4) {
|
|
||||||
this->CGObject_C::PostInit(time, init, a4);
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGItem_C::SetStorage(uint32_t* storage, uint32_t* saved) {
|
void CGItem_C::SetStorage(uint32_t* storage, uint32_t* saved) {
|
||||||
this->CGObject_C::SetStorage(storage, saved);
|
this->CGObject_C::SetStorage(storage, saved);
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,6 @@ class CGItem_C : public CGObject_C, public CGItem {
|
|||||||
|
|
||||||
// Public member functions
|
// Public member functions
|
||||||
CGItem_C(uint32_t time, CClientObjCreate& objCreate);
|
CGItem_C(uint32_t time, CClientObjCreate& objCreate);
|
||||||
void PostInit(uint32_t time, const CClientObjCreate& init, bool a4);
|
|
||||||
void SetStorage(uint32_t* storage, uint32_t* saved);
|
void SetStorage(uint32_t* storage, uint32_t* saved);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -44,14 +44,6 @@ int32_t CGObject_C::IsObjectLocked() {
|
|||||||
return this->m_lockCount != 0;
|
return this->m_lockCount != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGObject_C::PostReenable() {
|
|
||||||
// TODO
|
|
||||||
|
|
||||||
this->m_inReenable = false;
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGObject_C::Reenable() {
|
void CGObject_C::Reenable() {
|
||||||
this->m_disabled = false;
|
this->m_disabled = false;
|
||||||
this->m_inReenable = true;
|
this->m_inReenable = true;
|
||||||
@ -59,12 +51,6 @@ void CGObject_C::Reenable() {
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGObject_C::PostInit(uint32_t time, const CClientObjCreate& init, bool a4) {
|
|
||||||
this->m_postInited = true;
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGObject_C::SetBlock(uint32_t block, uint32_t value) {
|
void CGObject_C::SetBlock(uint32_t block, uint32_t value) {
|
||||||
auto storage = reinterpret_cast<uint32_t*>(this->m_obj);
|
auto storage = reinterpret_cast<uint32_t*>(this->m_obj);
|
||||||
storage[block] = value;
|
storage[block] = value;
|
||||||
|
|||||||
@ -25,8 +25,7 @@ class CGObject_C : public CGObject, public TSHashObject<CGObject_C, CHashKeyGUID
|
|||||||
// Virtual public member functions
|
// Virtual public member functions
|
||||||
virtual ~CGObject_C();
|
virtual ~CGObject_C();
|
||||||
virtual void Disable();
|
virtual void Disable();
|
||||||
void Reenable();
|
// TODO
|
||||||
void PostReenable();
|
|
||||||
virtual void HandleOutOfRange(OUT_OF_RANGE_TYPE type) {};
|
virtual void HandleOutOfRange(OUT_OF_RANGE_TYPE type) {};
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
@ -36,7 +35,7 @@ class CGObject_C : public CGObject, public TSHashObject<CGObject_C, CHashKeyGUID
|
|||||||
void AddWorldObject();
|
void AddWorldObject();
|
||||||
int32_t IsInReenable();
|
int32_t IsInReenable();
|
||||||
int32_t IsObjectLocked();
|
int32_t IsObjectLocked();
|
||||||
void PostInit(uint32_t time, const CClientObjCreate& init, bool a4);
|
void Reenable();
|
||||||
void SetBlock(uint32_t block, uint32_t value);
|
void SetBlock(uint32_t block, uint32_t value);
|
||||||
void SetDisablePending(int32_t pending);
|
void SetDisablePending(int32_t pending);
|
||||||
void SetObjectLocked(int32_t locked);
|
void SetObjectLocked(int32_t locked);
|
||||||
|
|||||||
@ -11,14 +11,6 @@ CGPlayer_C::~CGPlayer_C() {
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGPlayer_C::PostInit(uint32_t time, const CClientObjCreate& init, bool a4) {
|
|
||||||
// TODO
|
|
||||||
|
|
||||||
this->CGUnit_C::PostInit(time, init, a4);
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGPlayer_C::SetStorage(uint32_t* storage, uint32_t* saved) {
|
void CGPlayer_C::SetStorage(uint32_t* storage, uint32_t* saved) {
|
||||||
this->CGUnit_C::SetStorage(storage, saved);
|
this->CGUnit_C::SetStorage(storage, saved);
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,6 @@ class CGPlayer_C : public CGUnit_C, public CGPlayer {
|
|||||||
|
|
||||||
// Public member functions
|
// Public member functions
|
||||||
CGPlayer_C(uint32_t time, CClientObjCreate& objCreate);
|
CGPlayer_C(uint32_t time, CClientObjCreate& objCreate);
|
||||||
void PostInit(uint32_t time, const CClientObjCreate& init, bool a4);
|
|
||||||
void SetStorage(uint32_t* storage, uint32_t* saved);
|
void SetStorage(uint32_t* storage, uint32_t* saved);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
#include "object/client/CGUnit_C.hpp"
|
#include "object/client/CGUnit_C.hpp"
|
||||||
#include "db/Db.hpp"
|
#include "db/Db.hpp"
|
||||||
|
|
||||||
WOWGUID CGUnit_C::s_activeMover;
|
|
||||||
|
|
||||||
const char* CGUnit_C::GetDisplayClassNameFromRecord(const ChrClassesRec* classRec, UNIT_SEX sex, UNIT_SEX* displaySex) {
|
const char* CGUnit_C::GetDisplayClassNameFromRecord(const ChrClassesRec* classRec, UNIT_SEX sex, UNIT_SEX* displaySex) {
|
||||||
if (displaySex) {
|
if (displaySex) {
|
||||||
*displaySex = sex;
|
*displaySex = sex;
|
||||||
@ -99,18 +97,6 @@ CGUnit_C::~CGUnit_C() {
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGUnit_C::PostInit(uint32_t time, const CClientObjCreate& init, bool a4) {
|
|
||||||
// TODO
|
|
||||||
|
|
||||||
this->CGObject_C::PostInit(time, init, a4);
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGUnit_C::PostMovementUpdate(const CClientMoveUpdate& move, int32_t activeMover) {
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
void CGUnit_C::SetStorage(uint32_t* storage, uint32_t* saved) {
|
void CGUnit_C::SetStorage(uint32_t* storage, uint32_t* saved) {
|
||||||
this->CGObject_C::SetStorage(storage, saved);
|
this->CGObject_C::SetStorage(storage, saved);
|
||||||
|
|
||||||
|
|||||||
@ -5,16 +5,12 @@
|
|||||||
#include "object/client/CGObject_C.hpp"
|
#include "object/client/CGObject_C.hpp"
|
||||||
#include "object/client/CGUnit.hpp"
|
#include "object/client/CGUnit.hpp"
|
||||||
#include "object/Types.hpp"
|
#include "object/Types.hpp"
|
||||||
#include "util/GUID.hpp"
|
|
||||||
|
|
||||||
class ChrClassesRec;
|
class ChrClassesRec;
|
||||||
class ChrRacesRec;
|
class ChrRacesRec;
|
||||||
|
|
||||||
class CGUnit_C : public CGObject_C, public CGUnit {
|
class CGUnit_C : public CGObject_C, public CGUnit {
|
||||||
public:
|
public:
|
||||||
// Public static variables
|
|
||||||
static WOWGUID s_activeMover;
|
|
||||||
|
|
||||||
// Public static functions
|
// Public static functions
|
||||||
static const char* GetDisplayClassNameFromRecord(const ChrClassesRec* classRec, UNIT_SEX sex, UNIT_SEX* displaySex);
|
static const char* GetDisplayClassNameFromRecord(const ChrClassesRec* classRec, UNIT_SEX sex, UNIT_SEX* displaySex);
|
||||||
static const char* GetDisplayRaceNameFromRecord(const ChrRacesRec* raceRec, UNIT_SEX sex, UNIT_SEX* displaySex);
|
static const char* GetDisplayRaceNameFromRecord(const ChrRacesRec* raceRec, UNIT_SEX sex, UNIT_SEX* displaySex);
|
||||||
@ -24,8 +20,6 @@ class CGUnit_C : public CGObject_C, public CGUnit {
|
|||||||
|
|
||||||
// Public member functions
|
// Public member functions
|
||||||
CGUnit_C(uint32_t time, CClientObjCreate& objCreate);
|
CGUnit_C(uint32_t time, CClientObjCreate& objCreate);
|
||||||
void PostInit(uint32_t time, const CClientObjCreate& init, bool a4);
|
|
||||||
void PostMovementUpdate(const CClientMoveUpdate& move, int32_t activeMover);
|
|
||||||
void SetStorage(uint32_t* storage, uint32_t* saved);
|
void SetStorage(uint32_t* storage, uint32_t* saved);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -28,122 +28,9 @@ enum UPDATE_TYPE {
|
|||||||
UPDATE_IN_RANGE = 5,
|
UPDATE_IN_RANGE = 5,
|
||||||
};
|
};
|
||||||
|
|
||||||
void SkipSetOfObjects(CDataStore* msg) {
|
int32_t SkipPartialObjectUpdate(CDataStore* msg) {
|
||||||
uint32_t count;
|
// TODO
|
||||||
msg->Get(count);
|
return 0;
|
||||||
|
|
||||||
for (int32_t i = 0; i < count; i++) {
|
|
||||||
SmartGUID guid;
|
|
||||||
*msg >> guid;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t PostInitObject(CDataStore* msg, uint32_t time, bool a3) {
|
|
||||||
SmartGUID guid;
|
|
||||||
*msg >> guid;
|
|
||||||
|
|
||||||
uint8_t _typeID;
|
|
||||||
msg->Get(_typeID);
|
|
||||||
auto typeID = static_cast<OBJECT_TYPE_ID>(_typeID);
|
|
||||||
|
|
||||||
if (guid == 0) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto object = FindActiveObject(guid);
|
|
||||||
|
|
||||||
if (!object) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
CClientObjCreate init;
|
|
||||||
if (!init.Get(msg)) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (object->m_inReenable && object->m_obj->m_type & TYPE_UNIT) {
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
if (object->m_postInited) {
|
|
||||||
return CallMirrorHandlers(msg, true, guid);
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (typeID) {
|
|
||||||
case ID_OBJECT: {
|
|
||||||
object->PostInit(time, init, a3);
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case ID_ITEM:
|
|
||||||
case ID_CONTAINER: {
|
|
||||||
static_cast<CGItem_C*>(object)->PostInit(time, init, a3);
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case ID_UNIT: {
|
|
||||||
static_cast<CGUnit_C*>(object)->PostInit(time, init, a3);
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case ID_PLAYER: {
|
|
||||||
static_cast<CGPlayer_C*>(object)->PostInit(time, init, a3);
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case ID_GAMEOBJECT: {
|
|
||||||
static_cast<CGGameObject_C*>(object)->PostInit(time, init, a3);
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case ID_DYNAMICOBJECT: {
|
|
||||||
static_cast<CGDynamicObject_C*>(object)->PostInit(time, init, a3);
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case ID_CORPSE: {
|
|
||||||
static_cast<CGCorpse_C*>(object)->PostInit(time, init, a3);
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
default: {
|
|
||||||
STORM_APP_FATAL("PostInitObject: unknown object type %d", typeID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return SkipPartialObjectUpdate(msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PostMovementUpdate(CDataStore* msg) {
|
|
||||||
SmartGUID guid;
|
|
||||||
*msg >> guid;
|
|
||||||
|
|
||||||
CClientMoveUpdate move;
|
|
||||||
*msg >> move;
|
|
||||||
|
|
||||||
if (guid == CGUnit_C::s_activeMover) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t reenable;
|
|
||||||
auto unit = static_cast<CGUnit_C*>(GetUpdateObject(guid, &reenable));
|
|
||||||
|
|
||||||
if (!unit) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
unit->PostMovementUpdate(move, unit->m_obj->m_guid == CGUnit_C::s_activeMover);
|
|
||||||
|
|
||||||
if (reenable) {
|
|
||||||
unit->Reenable();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateOutOfRangeObjects(CDataStore* msg) {
|
void UpdateOutOfRangeObjects(CDataStore* msg) {
|
||||||
@ -435,57 +322,8 @@ int32_t ObjectUpdateFirstPass(CDataStore* msg, uint32_t time, uint32_t updateIdx
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t ObjectUpdateSecondPass(CDataStore* msg, uint32_t time, uint32_t updateCount) {
|
int32_t ObjectUpdateSecondPass(CDataStore* msg, uint32_t time, uint32_t updateCount) {
|
||||||
// Handle post updates
|
// TODO
|
||||||
|
return 0;
|
||||||
for (int32_t i = 0; i < updateCount; i++) {
|
|
||||||
uint8_t updateType;
|
|
||||||
msg->Get(updateType);
|
|
||||||
|
|
||||||
switch (updateType) {
|
|
||||||
case UPDATE_PARTIAL: {
|
|
||||||
if (!CallMirrorHandlers(msg, false, 0)) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case UPDATE_MOVEMENT: {
|
|
||||||
PostMovementUpdate(msg);
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case UPDATE_FULL:
|
|
||||||
case UPDATE_3: {
|
|
||||||
if (!PostInitObject(msg, time, updateType == UPDATE_3)) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case UPDATE_IN_RANGE:
|
|
||||||
case UPDATE_OUT_OF_RANGE: {
|
|
||||||
SkipSetOfObjects(msg);
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
default: {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Finish reenabling objects
|
|
||||||
|
|
||||||
while (auto reenabledObject = ClntObjMgrGetCurrent()->m_reenabledObjects.Head()) {
|
|
||||||
ClntObjMgrGetCurrent()->m_visibleObjects.LinkToTail(reenabledObject);
|
|
||||||
reenabledObject->PostReenable();
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t ObjectCompressedUpdateHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
|
int32_t ObjectCompressedUpdateHandler(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg) {
|
||||||
|
|||||||
@ -8,7 +8,6 @@
|
|||||||
#include "object/client/CGPlayer.hpp"
|
#include "object/client/CGPlayer.hpp"
|
||||||
#include "object/client/CGUnit.hpp"
|
#include "object/client/CGUnit.hpp"
|
||||||
#include "object/client/ObjMgr.hpp"
|
#include "object/client/ObjMgr.hpp"
|
||||||
#include "object/client/Util.hpp"
|
|
||||||
#include "object/Types.hpp"
|
#include "object/Types.hpp"
|
||||||
#include <common/DataStore.hpp>
|
#include <common/DataStore.hpp>
|
||||||
|
|
||||||
@ -151,49 +150,6 @@ int32_t IsMaskBitSet(uint32_t* masks, uint32_t block) {
|
|||||||
return masks[block / 32] & (1 << (block % 32));
|
return masks[block / 32] & (1 << (block % 32));
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t CallMirrorHandlers(CDataStore* msg, bool a2, WOWGUID guid) {
|
|
||||||
if (!a2) {
|
|
||||||
SmartGUID _guid;
|
|
||||||
*msg >> _guid;
|
|
||||||
|
|
||||||
guid = _guid;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto object = FindActiveObject(guid);
|
|
||||||
|
|
||||||
if (!object) {
|
|
||||||
return SkipPartialObjectUpdate(msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t changeMaskCount;
|
|
||||||
uint32_t changeMasks[MAX_CHANGE_MASKS];
|
|
||||||
if (!ExtractDirtyMasks(msg, &changeMaskCount, changeMasks)) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
OBJECT_TYPE_ID typeID = ID_OBJECT;
|
|
||||||
uint32_t blockOffset = 0;
|
|
||||||
uint32_t numBlocks = GetNumDwordBlocks(object->m_obj->m_type, guid);
|
|
||||||
|
|
||||||
for (int32_t block = 0; block < numBlocks; block++) {
|
|
||||||
if (block >= s_objMirrorBlocks[typeID]) {
|
|
||||||
blockOffset = s_objMirrorBlocks[typeID];
|
|
||||||
typeID = IncTypeID(object, typeID);
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
|
|
||||||
if (IsMaskBitSet(changeMasks, block)) {
|
|
||||||
uint32_t blockValue = 0;
|
|
||||||
msg->Get(blockValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t FillInPartialObjectData(CGObject_C* object, WOWGUID guid, CDataStore* msg, bool forFullUpdate, bool zeroZeroBits) {
|
int32_t FillInPartialObjectData(CGObject_C* object, WOWGUID guid, CDataStore* msg, bool forFullUpdate, bool zeroZeroBits) {
|
||||||
uint8_t changeMaskCount;
|
uint8_t changeMaskCount;
|
||||||
uint32_t changeMasks[MAX_CHANGE_MASKS];
|
uint32_t changeMasks[MAX_CHANGE_MASKS];
|
||||||
|
|||||||
@ -7,8 +7,6 @@
|
|||||||
class CDataStore;
|
class CDataStore;
|
||||||
class CGObject_C;
|
class CGObject_C;
|
||||||
|
|
||||||
int32_t CallMirrorHandlers(CDataStore* msg, bool a2, WOWGUID guid);
|
|
||||||
|
|
||||||
int32_t FillInPartialObjectData(CGObject_C* object, WOWGUID guid, CDataStore* msg, bool forFullUpdate, bool zeroZeroBits);
|
int32_t FillInPartialObjectData(CGObject_C* object, WOWGUID guid, CDataStore* msg, bool forFullUpdate, bool zeroZeroBits);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -164,8 +164,3 @@ void InitObject(CGObject_C* object, uint32_t time, CClientObjCreate& objCreate)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t SkipPartialObjectUpdate(CDataStore* msg) {
|
|
||||||
// TODO
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|||||||
@ -20,6 +20,4 @@ void HandleObjectOutOfRangePass2(CGObject_C* object);
|
|||||||
|
|
||||||
void InitObject(CGObject_C* object, uint32_t time, CClientObjCreate& objCreate);
|
void InitObject(CGObject_C* object, uint32_t time, CClientObjCreate& objCreate);
|
||||||
|
|
||||||
int32_t SkipPartialObjectUpdate(CDataStore* msg);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user