[WoW][5.0.5.16057] Reading Talents from Memory menu

User Tag List

Results 1 to 7 of 7
  1. #1
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [WoW][5.0.5.16057] Reading Talents from Memory

    All-

    Just a talent function that may help others. Basically it just reads the talent info out of memory and pulls the spell from the Talent DBC. If you need a DBC reader see Apoc's post here ([WoW][5.0.4.16016] x86 Info Dump Thread).

    Code:
            public enum CGSpecializationInfo
            {
                m_startTalentRec = 0xCC85F8,            // 5.0.5 16057
                m_numTalents = 0xCC85FC,                // 5.0.5 16057 Script_GetNumTalents (should be 18)
                Size = 0x2C,                            // 5.0.5 16057 Script_GetTalentInfo
            }
    
            public static List<UInt32> GetTalents()
            {
                List<UInt32> Spells = new List<uint>();
                
                uint SpellRecordPtr = Memory.ReadUInt((uint)CGSpecializationInfo.m_startTalentRec, "wow.exe");
                uint TotalTalents = Memory.ReadUInt((uint)CGSpecializationInfo.m_numTalents, "wow.exe");
    
                for (uint i = 0; i < TotalTalents; i++)
                {
                    uint index = Memory.ReadUInt(SpellRecordPtr + (i * (uint)CGSpecializationInfo.Size));
    
                    UInt32 Row = MyWoW.Helpers.ClientDB.Functions.ClientDB__GetRow(Memory.WowBaseAddress + (uint)MyWoW.Resources.Offsets.DBCs.Talent, index);
    
                    if (Row > 0x0)
                    {
                        UInt32 Spell = Memory.ReadUInt(Row + (uint)0x10);
    
                        Spells.Add(Spell);
                    }
                }
    
                return Spells;
            }
    Has anyone been able to determine which spells have + haven't been learned? Or how many talent skills or available? That's the last piece of the puzzle I need.

    Edit: CGSpecializationInfo::IsTalentSelected is at 0x5E1A80(rebased), still reversing...

    Thanks,
    ~ Tanaris
    Last edited by Tanaris4; 09-18-2012 at 07:28 PM.
    https://tanaris4.com

    [WoW][5.0.5.16057] Reading Talents from Memory
  2. #2
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, its easier to just use the known spells list (where the known type is 1), and the override list. The known spells list includes pet, and "future" spells. (I'm not sure if future spells includes talent-based ones or not) Once you do learn the spell, it is included in the known spells list.

    However, I've been finding the override list to be... less useful than expected.

    It does properly give you the overrides for any spell (eg; Victory Rush to Impending Victory), but it seems like you can't use some of the overrides when casting. Some require the base spell (such as with Mangle on druids, the cat form specific one needs to be used to check if the spell is usable, but you cast it with the "original" Mangle spell), and some seem to require you to cast the overridden spell (such as Thrash). It's very strange.

  3. #3
    -Ryuk-'s Avatar Elite User CoreCoins Purchaser Authenticator enabled
    Reputation
    529
    Join Date
    Nov 2009
    Posts
    1,028
    Thanks G/R
    38/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Tanaris4 View Post
    All-
    -snip-
    Has anyone been able to determine which spells have + haven't been learned? Or how many talent skills or available? That's the last piece of the puzzle I need.
    -snip-

    Checking what spells you have/could have is quite simple. I haven't checked if it was changed since 4.3.4 but my bot hasn't fell over :P


    Code:
    //Usage
    GeneralHelper.Magic.ReadStruct<SpellBookRec>(GeneralHelper.Magic.Read<IntPtr>(spellBook + (i * 4)));
    
    
            public enum KnownSpellType : uint
            {
                Learned = 1,
                NotLearned = 2,
                PetAction = 3,
                FlyOut = 4,
            }
    
    
    
    
            public struct SpellBookRec
            {
                public KnownSpellType Knowledgde;
                public uint ID;
                public uint RequiredLevel;
    
    
                public bool IsKnown { get { return this.Knowledgde == KnownSpellType.Learned; } }
                public bool IsAvailable { get { return this.RequiredLevel <= Manager.LocalPlayer.Level; } }
            }
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

  4. #4
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
            [StructLayout(LayoutKind.Sequential)]        internal struct KnownSpell
            {
                public uint KnownType;
                public int SpellId;
                public uint Level;
                public uint Unk_TabType;
                public byte Unk1;
                public byte Unk2;
    
    
                public override string ToString()
                {
                    return string.Format("KnownType: {0}, SpellId: {1}, Level: {2}, UnkTabType: {3}, Unk1: {4}, Unk2: {5}",
                        KnownType, SpellId, Level, Unk_TabType, Unk1, Unk2);
                }
            }
    Code:
            public static IEnumerable<int> GetKnownSpells()
            {
                var numSpells = memory.Read<int>(LocalPlayerNumKnownSpells);
                var spellBookInfoPtr = memory.Read<IntPtr>(LocalPlayerKnownSpells);
    
    
                for (int i = numSpells - 1; i >= 0; i--)
                {
                    var spellPtr = memory.Read<IntPtr>(spellBookInfoPtr + (i * 4));
                    var info = memory.Read<LocalPlayer.KnownSpell>(spellPtr);
                    if (info.KnownType == 1 && info.Unk2 == 0)
                        yield return info.SpellId;
                }
            }
    Minor edits. But there you go.

    KnownType hasn't changed. (Check Ryuk's post)

  5. #5
    guizmows's Avatar Banned
    Reputation
    57
    Join Date
    Feb 2008
    Posts
    414
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    and some seem to require you to cast the overridden spell (such as Thrash). It's very strange.
    oh didn't notice this.

    I'm always using base spell and have no problem so far. I'll look closer.

  6. #6
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by guizmows View Post
    oh didn't notice this.

    I'm always using base spell and have no problem so far. I'll look closer.
    The problem is when you use their "real" CastSpell function (the one that doesn't do any extra work, it simply does some checks on which packet to send, then sends it). Using another function seems to handle all that nonsense for you

    Basically, you need to either do 3 func calls (or implement 2 of them yourself, which is also very easy)

    Code:
        overrideSpellId = GetOverrideSpellId(spellId);    knownSpellIndex = GetKnownSpellIndex(overrideSpellId, isPetSpell);
        if ( knownSpellIndex >= 0 )
        {
          CGSpellBook::CastSpell(knownSpellIndex, isPetSpell, targetGuid, optional);
          return 0;
        }
    Code:
            GetSpellOverrideId = 0x009BF860 - 0x400000,
            GetKnownSpellIndex = 0x009BBE60 - 0x400000,
    Simply call a wrapper func (using those functions) with the original spell ID, and it handles taking care of which override to call, etc. I'm sure there's some way to implement this fully OOP, but honestly, I've been working on it for too long, and just don't care anymore!

  7. #7
    broganana1's Avatar Private
    Reputation
    1
    Join Date
    Sep 2012
    Posts
    9
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Basically it just reads the talent info out


Similar Threads

  1. Reading buffs from memory
    By oliman in forum SWTOR Bots and Programs
    Replies: 0
    Last Post: 02-10-2012, 02:22 PM
  2. i NEED WOW+TBC CD KEYS PLZ READ!!!
    By Kileris in forum Community Chat
    Replies: 1
    Last Post: 01-28-2008, 09:13 AM
  3. [Guide][VB.NET] Reading a String From Memory
    By Gothian in forum WoW Memory Editing
    Replies: 14
    Last Post: 01-18-2008, 12:08 PM
  4. What is good about wow? [Parents will buy wow for you after they read this!]
    By latruwski in forum Screenshot & Video Showoff
    Replies: 8
    Last Post: 12-15-2007, 06:58 PM
  5. WTT WoW account for glider key. READ.
    By Elites360 in forum Members Only Accounts And CD Keys Buy Sell
    Replies: 3
    Last Post: 02-21-2007, 10:39 AM
All times are GMT -5. The time now is 05:36 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