Originally Posted by
siriuz
I want to do it with mem reading only, but this maybe pushes me in the right direction ... thx
Reverse those functions, they tell you what to monitor.
GetMaxBattlefieldID tells you where to read the maximum amount of battlegrounds from, GetBattleFieldStatus tells you where to read the status from.
Edit: There's a linked list with its head at WoW.exe + 0xACCAE8 (next pointer at offset 0x4, status offset at 0x34)
Smashed together a small Lua script for CheatEngine (first time I used CE's lua engine): CheatEngine -> Memory Viewer -> Tools -> Lua Engine
Code:
function hasBGInvite()
local cur = getNameFromAddress("[WoW.exe+ACCAE8]")
while(true) do
-- CE Lua doesn't seem to have bitwise operations...
-- basically: if (cur & 1 || !cur) break;
local lsb = tonumber((""..getAddress(cur)):sub(-1))
if (lsb == 1 or lsb == 3 or lsb == 5 or lsb == 7 or lsb == 9 or cur == 0) then
break;
end
local status = readInteger(cur.."+34")
if status == 2 then
return true
end
cur = getNameFromAddress("["..cur.."+4".."]")
end
return false
end
if hasBGInvite() then
print("Invite")
else
print("No Invite")
end