-
Member
Got this code atm:
enum SpellCooldown
{
CoolDown = 0xCA3C98
,SpellCharges = 0xCA3C90 //charges, maxCharges, start, duration = GetSpellCharges("name")
};
int WoWUnit::GetCharges(int spell_id)
{
int currentCharges = 0;
uint currentListObject = Memory.Read<uint>(Memory.BaseAddress() + Pointers::SpellCooldown::SpellCharges + 0x20);
while ((currentListObject != 0) && ((currentListObject & 1) == 0))
{
uint spellId = Memory.Read<uint>(currentListObject + 8 );
if (spellId == spell_id)
currentCharges += (int)Memory.Read<byte>(currentListObject + 12);
currentListObject = Memory.Read<uint>(currentListObject + 4); //Get next list object
}
return currentCharges;
}
int StarSurgeCharges = 3 - PlayerP->GetCharges(1485);
int ConflagrateCharges = 2 - PlayerP->GetCharges(672);
Last edited by 2briards; 11-13-2014 at 08:14 AM.
-
Post Thanks / Like - 1 Thanks
Torpedoes (1 members gave Thanks to 2briards for this useful post)
-
Member
$SpellCooldownPtr = $WowBase + 0xCA3C90
$FirstSpellOffset = 0x8
-
Member
GetCharges(1485);
1485 is spell id?
-
Member
Originally Posted by
kingcrypto
GetCharges(1485);
1485 is spell id?
Yes, that is the star surge charge id , 672 is for conflagrate
-
Member
hi 2briards, do you know how to translate spellid to chargeid ? since the original GetSpellCharges use spellid.
-
Contributor
Originally Posted by
iceblockman
hi 2briards, do you know how to translate spellid to chargeid ? since the original GetSpellCharges use spellid.
Look in SpellCategories.db2. Category is what are you looking for.
Code:
public struct SpellCategoriesRec
{
public int Id;
public int SpellId;
public int dword8;
public int dwordC;
public int DamageClass;
public int Dispel;
public int Mechanic;
public int PreventionType;
public int StartRecoveryCategory;
public int Category;
}
-
Member
Oh my god dbc reading ? i remember i tried to figure out that a couple of months ago. But still not get that.
anyone like to share a recent sample code of dbc reading ? or pm me. a lot thanks for that.
actually 2briards's code is enough for my personal dps rotation bot, just wanna make the GetSpellCharges function less hardcoded.
-
Originally Posted by
iceblockman
anyone like to share a recent sample code of dbc reading?
I can't help you with that one but I can offer you a tip. Have you tried dissecting the structure using CheatEngine? Just by looking at memory alone will help you understand what's going on.
-
Active Member
Could anybody help to know how ClntObjMgrObjectPtr gets called in asm for WoD??
Since GUID is now longer, how many registers do i have to pass and so on.
Last edited by R4zyel; 11-17-2014 at 09:55 AM.
-
Active Member
Originally Posted by
R4zyel
Could anybody help to know how ClntObjMgrObjectPtr gets called in asm for WoD??
Since GUID is now longer, how many registers do i have to pass and so on.
Code:
void* __cdecl ClntObjMgrObjectPtr(DWORD128* pGuid, int filter = -1);
Last edited by andy2002ua; 11-23-2014 at 04:38 PM.
-
Active Member
Originally Posted by
andy2002ua
Code:
void* __cdecl ClntObjMgrObjectPtr(DWORD128* pGuid, DWORD filter = -1);
Ty mate i solved it, if anybody is interested.
mov eax, (POINTER OF GUID 16 bytes long)
push 0
push 0xFFFFFFFF (Filter between units)
push eax
call ClntObjMgrObjectPtr
-
Originally Posted by
R4zyel
Ty mate i solved it, if anybody is interested.
mov eax, (POINTER OF GUID 16 bytes long)
push 0
push 0xFFFFFFFF (Filter between units)
push eax
call ClntObjMgrObjectPtr

There are two functions. Don't get confused... One is like you say, the other is like he said where you just pass the GUID NOT the pointer
|Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|
-
Active Member
Originally Posted by
-Ryuk-
There are two functions. Don't get confused... One is like you say, the other is like he said where you just pass the GUID NOT the pointer
I mean this one:
Code:
00657C4C : ClntObjMgrObjectPtr // not rebased
and it takes two arguments: pointer to GUID and filter
-
Member
Hi, what offset used for lua unlock whith Dynamorio (Unlocking Lua with DynamoRIO)?
-
Originally Posted by
-Ryuk-
There are two functions. Don't get confused... One is like you say, the other is like he said where you just pass the GUID NOT the pointer
So, you pass the object pointer to obtain the object pointer..?