Wisling / tibiaauto

Tibia Auto is made to excel in the automation of various aspects of the playing the MMORPG Tibia
31 stars 16 forks source link

Mana bar #16

Closed denisdifazio closed 8 years ago

denisdifazio commented 8 years ago

Small refinements I forgot to commit in the last pull

dmarszk commented 8 years ago

Just FYI - there were 2 mem leaks and really nasty compiler optimization bug (please always test stuff in Release aswell ;) ) d6d07184f386bf6857733a5d1c9149c3a6a7f552

dmarszk commented 8 years ago

It would appear that there's still some issue with this patch, judging from http://tibiaauto.net/forum/viewtopic.php?f=34&t=1018535&start=15

Did anyone test it on Win7 Home Premium x64? (probably home premium part is not that important)

dmarszk commented 8 years ago

Wrong. It messes up OGL and DX5. ;)

denisdifazio commented 8 years ago

Sorry for the mess guys. I reversed it using DX8+. I totally forgot about the other engines.

dmarszk commented 8 years ago

.text:005811B3 call dword ptr [edx+14h]

That should give you some thinking. ;)

Wisling commented 8 years ago

Good point. During the update, I was wondering why it wasn't hard-coded. How on earth did you find where DirectX draws rectangles for the manabar in the first place?

dmarszk commented 8 years ago

I guess pretty straightforward would be memory onaccess breakpoint on some creature hp field. U would likely end up in battlefield hp + gamescreen hp bars rendering procs.

denisdifazio commented 8 years ago

Awesome finding Rebel!

Wisling, I was checking all calls to "printText" function. One of these calls is created in the code region where it prints creatures' name. The code for drawing HP bar is near it.

Wisling commented 8 years ago

That's a good and easy way to find it. No specific knowledge of graphic functions necessary.