How to read proc and alternative resource information from memory? menu

User Tag List

Results 1 to 2 of 2
  1. #1
    Wappel's Avatar Member
    Reputation
    1
    Join Date
    Nov 2012
    Posts
    12
    Thanks G/R
    3/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to read proc and alternative resource information from memory?

    Hi,

    i've developed a simple test bot (c#).
    I can read the player name, player health and power from memory.

    But i don't know how to read other information like the druid eclipse bar status (solar/lunar state) or the soul shard information (warlock).
    And I don't have an idea how to recognize procs. (for example a starsurge proc / druid).


    The pseudo code for the player health is very simple:

    Health = [[[WowBaseAdress + LocalPlayerAdress] + DescriptorOffset] + HealthOffset]

    But how can i read the other information from memory? Do I also have to start with the LocalPlayerAdress?

    Thanks for help!

    How to read proc and alternative resource information from memory?
  2. #2
    ejt's Avatar Contributor
    Reputation
    210
    Join Date
    Mar 2008
    Posts
    166
    Thanks G/R
    3/112
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    This is what i use in C++ (power types)

    PHP Code:
    enum class WoWPowerType
    {
        
    Mana,
        
    Rage,
        
    Focus,
        
    Energy,
        
    Chi,
        
    Runes,
        
    RunicPower,
        
    SoulShards,
        
    Eclipse,
        
    HolyPower,
        
    Alternate,
        
    DarkForce,
        
    LightForce,
        
    ShadowOrbs,
        
    BurningEmbers,
        
    DemonicFury,
    };

    WoWPowerType WoWUnit::GetPowerType()
    {
        
    uint32 overridePowerId Descriptor<uint32>(UNIT_FIELD_OVERRIDE_DISPLAY_POWER_ID);
        if (
    overridePowerId == 0)
            return (
    WoWPowerType)(Descriptor<uint32>(UNIT_FIELD_DISPLAY_POWER) & 0xFF);
        else
            return (
    WoWPowerType)overridePowerId;
    }

    std::string WoWUnit::GetPowerTypeName()
    {
        switch (
    PowerType)
        {
        case 
    WoWPowerType::Mana: return "Mana";
        case 
    WoWPowerType::Rage: return "Rage";
        case 
    WoWPowerType::Focus: return "Focus";
        case 
    WoWPowerType::Chi: return "Chi";
        case 
    WoWPowerType::Runes: return "Runes";
        case 
    WoWPowerType::RunicPower: return "Runic Power";
        case 
    WoWPowerType::SoulShards: return "Soulshards";
        case 
    WoWPowerType::Eclipse: return "Eclipse";
        case 
    WoWPowerType::HolyPower: return "Holy Power";
        case 
    WoWPowerType::Alternate: return "Alternate";
        case 
    WoWPowerType::DarkForce: return "Dark Force";
        case 
    WoWPowerType::LightForce: return "Light Force";
        case 
    WoWPowerType::ShadowOrbs: return "Shadow Orbs";
        case 
    WoWPowerType::BurningEmbers: return "Burning Embers";
        case 
    WoWPowerType::DemonicFury: return "Demonic Fury";
        default: return 
    "";
        }

    Getting auras is a bit more complicated then reading an address but I'll post the code I use for it here

    You have to search for the offsets, I have not updated them for 6.2 yet.

    In this function I also search for matching string in a table of all the spells in the game, you can just modify it to work with spell ids.

    PHP Code:
    bool WoWUnit::HasAura(std::string name)
    {
        
    uint32 auraCount Read<uint32>(UnitAuraCount1);
        
    uint32 auraTable Read<uint32>(UnitAuraTable1);

        if (
    auraCount == -1)
        {
            
    auraCount Read<uint32>(UnitAuraCount2);
            
    auraTable Read<uint32>(UnitAuraTable2);
        }

        for (
    uint32 i 0auraCount; ++i)
        {
            
    uint32 base = (auraTable + (UnitAuraSize i));
            
    WoWGuid ownerGuid;
            
    uint32 spellId;
            
    int8 flags;
            
    int8 stack;
            
    uint32 level;
            
    uint32 size;

            
    ownerGuid.LoWord ReadRelative<uint64>(base UnitAuraOwnerGUID);
            
    ownerGuid.HiWord ReadRelative<uint64>(base + (UnitAuraOwnerGUID 0x8));
            
    spellId ReadRelative<uint32>(base UnitAuraSpellId);
            
    flags ReadRelative<int8>(base UnitAuraFlags);
            
    stack ReadRelative<int8>(base UnitAuraStack);
            
    level ReadRelative<uint32>(base UnitAuraCasterLevel);
            
    // time left
            
    size ReadRelative<uint32>(base UnitAuraSize);

            if (
    spellId && (flags 20)) // Filter out spells without id and flag 0x20 (whatever that is, but it works)
                
    if (m_ObjMgr->Spell[spellId] == name// Should probably make a SpellManager class...
                    
    return true;
        }

        return 
    false;

    That should get you started.

    Edit:
    Oh and I think alternative powers are in the descriptors, UNIT_FIELD_POWER takes up 6 DWORDs, just look it up in CE and see what is what.
    Last edited by ejt; 07-28-2015 at 03:59 PM.

Similar Threads

  1. Reading scene information from memory
    By darthsidious in forum Diablo 3 Memory Editing
    Replies: 7
    Last Post: 10-12-2012, 03:26 PM
  2. How to read .M2 informations ?
    By 0megear in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 01-08-2008, 07:40 AM
  3. [READ ME] How to ask Questions and Request edits
    By Mudkip in forum WoW ME Questions and Requests
    Replies: 9
    Last Post: 11-07-2007, 04:10 PM
All times are GMT -5. The time now is 06:02 PM. 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