Created
February 3, 2016 18:28
-
-
Save Konctantin/df8d130e142f4b70ccb1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| enum ObjectType | |
| { | |
| Object = 0, | |
| Item = 1, | |
| Container = 2, | |
| Unit = 3, | |
| Player = 4, | |
| GameObject = 5, | |
| Dynamicobject = 6, | |
| Corpse = 7, | |
| Areatrigger = 8, | |
| Sceneobject = 9, | |
| NumClientObjectTypes= 0xA | |
| }; | |
| typedef struct { | |
| __int64 hi; | |
| __int64 lo; | |
| } WowGuid128; | |
| class WowObject | |
| { | |
| public: | |
| WowObject(DWORD_PTR baseAddr) { this->m_BaseAddress = baseAddr; } | |
| void SetBaseAddr(DWORD_PTR baseAddr) { m_BaseAddress = baseAddr; } | |
| DWORD_PTR GetBaseAddr() { return m_BaseAddress; } | |
| WowGuid128 GetGuid() { return *(WowGuid128*)(m_BaseAddress + 0x28); } | |
| ObjectType GetType() { return *(ObjectType*)(m_BaseAddress + 0x0C); } | |
| DWORD GetEntry() { return *(DWORD*) (m_BaseAddress + 0x24); } | |
| BOOL IsBoobing() { return *(BYTE*) (m_BaseAddress + 0x104); } | |
| private: | |
| DWORD_PTR m_BaseAddress; | |
| }; | |
| DECLSPEC_NOINLINE signed int __cdecl testFunc(void* luaState) | |
| { | |
| printf("test\n"); | |
| DWORD_PTR CurrentManager = *(DWORD_PTR*)0/* todo */; | |
| WowObject currentObject(*(DWORD_PTR*)(CurrentManager + 0xD8)); | |
| while (((currentObject.GetBaseAddr() & 1) == 0) && currentObject.GetBaseAddr()) | |
| { | |
| if (currentObject.GetType() == ObjectType::GameObject) | |
| { | |
| printf(""); | |
| } | |
| currentObject.SetBaseAddr(*(DWORD_PTR*)(currentObject.GetBaseAddr() + 0x3C)); | |
| } | |
| return NULL; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment