-
Contributor
[C#] Simple read-only implementation
Hello folks,
I'm developing an application which adds support for RGB gaming gear to games.
I'd love to do WoW but I'm not very familiar with memory reading WoW (For my application I've mostly tried to avoid memory reading, but rely on official API's/SDK's
If anyone could provide a working sample for 64-bits of reading some simple things like player class, level, HP etc. that would be very helpful 
Project link should someone be curious: GitHub - SpoinkyNL/Artemis: Adds third-party support for RGB keyboards to games.
-
WoW does not have an API that is accessible outside of it's own process, so you'll have no choice but to handle the data with memory reading. Nevertheless, I've not heard of Warden detecting third party tools that only read memory. So you should be safe in that regard.
Reading info for the player is easy - you won't need any other objects' information so you can avoid the object manager and just use CGPlayer_C::m_activePlayerPtr (a static variable that points directly to the player entity.) In 7.0.3.22522 this lies at Wow.exe!00DE545C and Wow-64.exe!000000000169BCB0 on the x86 and x64 clients respectively. You can then read class, level, and health information from the descriptors, which are pointed to at +0x08.
Pseudo-C# example:
Code:
// Offsets:
static IntPtr CGPlayer_C__m_activePlayerPtr = IntPtr.Size == 4 ?
(IntPtr) 0x00DE545C : // 7.0.3.22522 x86
(IntPtr) 0x000000000169BCB0; // 7.0.3.22522 x64
// Descriptors:
const int CGUnitData__health = 12 + 48;
Code:
// Read the player's health:
var player = Memory.Read<IntPtr>(wowBaseAddress + CGPlayer_C__m_activePlayerPtr);
var health = GetDescriptor<long>(player, CGUnitData__health);
Code:
static T GetDescriptor<T>(IntPtr player, int descriptor) {
var descriptorsPtr = Memory.Read<IntPtr>(player + 0x08);
return Memory.Read<T>(descriptorsPtr, descriptor * 4);
}
Last edited by Jadd; 08-28-2016 at 01:19 PM.
-
Post Thanks / Like - 2 Thanks
homer91,
T@rget (2 members gave Thanks to Jadd for this useful post)
-
Contributor
Thank you for your help, it got me on the right track.
I've opted to go with the ObjectManager afterall so I can do some more stuff like target etc.
When I add WoW support I'll just have to add a little disclaimer that it breaks the ToS and is at the users own risk, however minimal the risk may be.