GetAura menu

User Tag List

Thread: GetAura

Results 1 to 4 of 4
  1. #1
    nitrogrlie's Avatar Member
    Reputation
    11
    Join Date
    Oct 2009
    Posts
    81
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    GetAura

    So IDA gives following for address 0x0056CA50:

    Code:
    int __thiscall CGUnit_C__GetAura(int this, unsigned int a2)
    {
      unsigned int v2; // edx@2
      int result; // eax@6
    
      if ( *(_DWORD *)(this + 3536) == -1 )
        v2 = *(_DWORD *)(this + 3156);
      else
        v2 = *(_DWORD *)(this + 3536);
      if ( a2 >= v2 )
      {
        result = 0;
      }
      else
      {
        if ( *(_DWORD *)(this + 3536) == -1 )
          result = *(_DWORD *)(this + 3160) + 24 * a2;
        else
          result = this + 24 * a2 + 3152;
      }
      return result;
    }
    I am guessing that in reality the return value is a pointer to an Aura struct (probably very similar to the one given via the Lua_UnitAura() function). And the "int a2" argument is the index into the Aura array which you can for loop over and max at the Num of Auras as reported by function at address 0x0049E830:

    Code:
    int __thiscall CGUnit_C__GetAuraCount(int this)
    {
      int result; // eax@1
    
      result = *(_DWORD *)(this + 3536);
      if ( result == -1 )
        result = *(_DWORD *)(this + 3156);
      return result;
    }
    Am I correct? currently unable to verify this by just running wow... don't ask.

    GetAura
  2. #2
    themind's Avatar Private
    Reputation
    1
    Join Date
    Mar 2010
    Posts
    5
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    here is my snippet of code to retrieve aura IDs:
    Code:
    int auraCount1 = wow.ReadInt(curObjBase + Offsets::AuraCount1);
    int auraCount2 = wow.ReadInt(curObjBase + Offsets::AuraCount2);
    //cout << "Aura count #1: " << dec << auraCount1 << endl;
    //cout << "Aura count #2: " << dec << auraCount2 << endl;
    
    if(auraCount1 >= 0) { // normal table
        uint tableBase = curObjBase + Offsets::Table1;
        ushort spellID;
        hasAura = false;
        for (int i = 0; i < auraCount1; ++i) {
    	spellID = wow.ReadUShort(tableBase + i * Offsets::AuraSize + Offsets::AuraOffset);
    	//cout << () << " ";
    	if(spellID == 44401) // missle barrage
    		hasAura = true;
        }
    } else { // extended table
        uint tableBase = wow.ReadUInt(curObjBase + Offsets::Table2);
        ushort spellID;
        hasAura = false;
        for (int i = 0; i < auraCount2; ++i) {
    	spellID = wow.ReadUShort(tableBase + i * Offsets::AuraSize + Offsets::AuraOffset);
    	//cout << () << " ";
    	if(spellID == 44401) // missle barrage
    		hasAura = true;
        }
    
    }
    I hope it helps
    Last edited by themind; 03-13-2010 at 05:52 PM.

  3. #3
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Fyi your code would be a lot cleaner if you removed the code duplication:

    Code:
    int auraCount1 = wow.ReadInt(curObjBase + Offsets::AuraCount1);
    int auraCount2 = wow.ReadInt(curObjBase + Offsets::AuraCount2);
    
    int AuraCount = AuraCount1 ? AuraCount1 : AuraCount2;
    uint TableBase = wow.ReadUInt(curObjBase + (AuraCount1 ? Offsets::Table1 : Offsets::Table2));
    
    ushort spellID;
    hasAura = false;
    for (int i = 0; i < AuraCount; ++i) 
    {
    	spellID = wow.ReadUShort(tableBase + i * Offsets::AuraSize + Offsets::AuraOffset);
    	if(spellID == 44401) // missle barrage
    		hasAura = true;
    }

  4. #4
    themind's Avatar Private
    Reputation
    1
    Join Date
    Mar 2010
    Posts
    5
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    my bad, thx

All times are GMT -5. The time now is 02:16 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search