are you using the same function he does? "0x0047BBC0" is with the filter isn't it?
are you using the same function he does? "0x0047BBC0" is with the filter isn't it?
Im using the same:
Code:typedef void (__cdecl* tEnumVisibleObjects)(void*, INT); typedef DWORD (__cdecl* tGetObjectByGUID)(UINT64); tEnumVisibleObjects EnumVisibleObjects = (tEnumVisibleObjects)0x0047B940; tGetObjectByGUID GetObjectByGUID = (tGetObjectByGUID)0x0047BBC0; int __cdecl EnumObject(UINT64 guid, INT) { FILE* fGuidLog = fopen("C:\\GUIDLog.txt", "a"); DWORD dwAddr = GetObjectByGUID(guid); UINT typeid_ = 0.0f; ReadProcessMemory(GetCurrentProcess(), (LPCVOID)(dwAddr + 0x14), &typeid_, 4, 0); fprintf(fGuidLog, "Type: %u\n", typeid_); fclose(fGuidLog); return 1; }
unfortunately that doesn't work either. perhaps the problem lies somewhere else... =/
The problem lies somewhere else. I could run your code fine (using a memory reader that is pretty much same as Apoc's WhiteMagic and replacing your Offsets.Whatever with 0xDEADBEEF). Double check your offsets.
A few comments though:
is incorrect. ObjectList is the result of a LINQ query, so anything you add to it will not be maintained when you next query it.Code:if (Me == IntPtr.Zero) { Me = ClntObjMgrGetWoWLocalPlayerWow(); ObjectList.Add(Me); }
I'm assuming you're incrementing that frame counter elsewhere. Otherwise, you will either remove invalid entries every frame, or no frames (depending on _frameCounter's initial value).Code:Main._frameCounter % 10 == 0
strange. i just replaced the Offsets enum with "0x0047BBC0" (just checked it again and according to the infodump thread "0047BBC0 ClntObjMgrObjectPtr
" is correct) but it still doesn't work.
i also changed the "me-updater" to "Me.UpdateObjectPointer(GetActivePlayerPtr)" and yes i'm incrementing the "_framecounter" somewhere else.
And your other offsets? EnumVisibleObjects: 0x0047B940, GetActivePlayer: 0x0047A5C0? Have you logged information out to file or whatever to ensure that you are actually getting to where you are calling GetObjectByGUID? Peraps there is something else in your code that is causing the method to exit before even getting there?
My assumption would be that you have something else in your code that is causing a problem - either a non-fatal exception that stops the method running, a semantically incorrect if-statement that stops the method running, or some other error in some location. Try to log stuff out to files to get a better idea of the flow of your program and what is getting called where/when etc.
Also, it wasn't the Me = ClntObjMgrGetWoWLocalPlayerWow(); line that had the problem - it was the ObjectList.Add(Me); -this doesn't make sense, as ObjectList is a LINQ expression that is built from a separate collection on every get operation, meaning anything you add to it is not persistent.
yes those offsets are fine too =/ i'll log the stuff and report backthank you very much for your help
ok i now know the problem ^^ thanks alot again for the brilliant idea of logging stuff tu a text file xD
Brilliant idea? That should be your first step! I assumed you had already done that to some extent
i tried it via debugging and gui, but a file is far better than both and i did't have that idea
I know it's been a while since a post was made to this thread, but since it is related I didn't want to spawn a new thread.
This is running against WoW version 4.0.6.
I am calling EnumVisibleObjects (passing a pointer to the callback function) from my EndScene hook.
The odd thing is, is that it hits my callback function once with a valid GUID and then it never hits it a second time it simply crashes the client with no error message or crash screen it just simply closes it.
Right now my callback is doing nothing but returning 1 (to indicate to keep enumerating).
I know I am using the correct offset since it is atleast calling it once and I am using the correct delegates since it is calling the function and then calling my callback.
The only difference is, is that my object manager is not static.
I cannot for the life of me figure out what the issue could be.
Does anyone have any ideas why it would hit it once then close WoW? I do not get any access violations or anything else.
Thanks!
[16:15:41] Cypher: caus the CPU is a dick
[16:16:07] kynox: CPU is mad
[16:16:15] Cypher: CPU is all like
[16:16:16] Cypher: whatever, i do what i want
Thank you again for your response.
Hmmm, that makes sense.... So as long as the delegate/callback function is static it should work?
The odd thing is, is that it calls it once (somehow).
On a side note, the EndScene detoured function I have is not a static function but it works fine. (or so I think). Should the EndScene detour also be static or does it have to be? Right now my ObjectManager is not static.
If you're in process, why not make it static? It's not like you can have multiple instances of the game's object manager.