[C#][Copy/Pasta] Out of process DBC reading menu

User Tag List

Page 4 of 4 FirstFirst 1234
Results 46 to 52 of 52
  1. #46
    counted's Avatar Contributor Authenticator enabled
    Reputation
    203
    Join Date
    Mar 2008
    Posts
    183
    Thanks G/R
    11/108
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Thanks Apoc!!

    Thanks for the help. Hexrays is sweet, wish i could afford it. Even though I should have figured that one out on my own.

    For those who are working with this here is an example of the usage to get a spell name.

    14177 is the spellID for Cold Blood.

    Code:
    GWoWDb dbcReader = new GWoWDb();
    GWoWDb.Row dbcRow = dbcReader[ClientDb.Spell].GetLocalizedRow(14177);
    if ( dbcRow.IsValid)
    {
       SpellEntry theSpell = new SpellEntry();
       theSpell = dbcRow.GetStruct<SpellEntry>();
       string theSpellName = GObjectList.WowReader.ReadASCIIString(theSpell.SpellName, 256);
    }
    else
    {
       theSpellName = "invalid";
    }
    Last edited by counted; 04-29-2010 at 12:01 AM. Reason: Need to Check if dbcRow.IsValid some units have invalid Auras and it will bomb

    [C#][Copy/Pasta] Out of process DBC reading
  2. #47
    counted's Avatar Contributor Authenticator enabled
    Reputation
    203
    Join Date
    Mar 2008
    Posts
    183
    Thanks G/R
    11/108
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Needed to add a check on lpRow

    I was checking out my code on a practice dummy and it had Aura 7056 on it which returned a IntPtr.Zero value into lpRow.

    I added a check before doing the ClientDB unpack for valid lpRow

    Code:
      public static void GetLocalizedRow(IntPtr clientDb, int recordId, out IntPtr buffer)
            {
                clientDb = (IntPtr) (clientDb.ToInt32() - 0x18);
                var header = Memory.ReadStruct<WoWDb.WoWClientDb>(clientDb);
                buffer = IntPtr.Zero;
                if (recordId >= header.MinIndex && recordId <= header.MaxIndex)
                {
                    var lpRow = Memory.Read<IntPtr>((IntPtr) (header.Rows.ToInt32() + (4 * (recordId - header.MinIndex))));
                    if(lpRow != IntPtr.Zero)
                    {
                         if (Memory.Read<byte>((IntPtr) WOW_USE_SPELL_UNPACK) == 1)
                         {
                             ClientDbUnpack(lpRow, 0x2C0u, out buffer);
                         }
                         else
                         {
                             byte[] data = Memory.ReadBytes(lpRow, 0x2C0);
                             buffer = Marshal.AllocHGlobal(0x2C0);
                             Marshal.Copy(data, 0, buffer, 0x2C0);
                         }
                     }
                }
            }

  3. #48
    miceiken's Avatar Contributor Authenticator enabled
    Reputation
    208
    Join Date
    Dec 2007
    Posts
    401
    Thanks G/R
    7/8
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do I need to use ClientDb_Unpack when using GetLocalizedRow injected? I think I remember Apoc mentioning that GetLocalizedRow took care of that?

  4. #49
    Apoc's Avatar Angry Penguin
    Reputation
    1387
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    After some more deliberation; I've come to realize that it's not 'GetLocalizedRow'. It's actually SpellDB__Unpack. Since only Spell.dbc uses that func. :P

    So yea, there are likely other unpack funcs for 'large' DBCs, but I couldn't tell you which ones, because I don't rightly care!

    And no; if you're injected and calling SpellDB_Unpack, then you don't need to worry about it.

  5. #50
    miceiken's Avatar Contributor Authenticator enabled
    Reputation
    208
    Join Date
    Dec 2007
    Posts
    401
    Thanks G/R
    7/8
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I see, but does GetLocalizedRow call Unpack internally or do I have to do it externally?

    I am refering to: PyMode/Client/ClientDb.cs at master from Kryso's PyMode - GitHub - doesn't work with
    GetLocalizedRow: 0x004CFD20
    Spell.dbc Ptr: 0x00A751FC
    Last edited by miceiken; 08-16-2010 at 01:26 PM. Reason: Wrote Text instead of Row :D

  6. #51
    Flushie's Avatar Master Sergeant
    Reputation
    -13
    Join Date
    May 2010
    Posts
    72
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Cypher View Post
    You're a moron.
    Haha I lol'd classes aren't public.... TROLLLLLOLOLOL

  7. #52
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1356
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Apoc View Post
    After some more deliberation; I've come to realize that it's not 'GetLocalizedRow'. It's actually SpellDB__Unpack. Since only Spell.dbc uses that func. :P

    So yea, there are likely other unpack funcs for 'large' DBCs, but I couldn't tell you which ones, because I don't rightly care!

    And no; if you're injected and calling SpellDB_Unpack, then you don't need to worry about it.
    I told you that ages ago and you never listened you jew.

Page 4 of 4 FirstFirst 1234

Similar Threads

  1. Read Chat messages out-of-process
    By kajko in forum WoW Memory Editing
    Replies: 2
    Last Post: 05-06-2011, 10:55 AM
  2. Replies: 47
    Last Post: 03-09-2010, 11:25 AM
  3. [mac][3.3.2] Client DB - Out of Process Reading
    By Tanaris4 in forum WoW Memory Editing
    Replies: 18
    Last Post: 03-02-2010, 05:14 PM
  4. Reading Chat Out-of-Process
    By RiseAndShine in forum WoW Memory Editing
    Replies: 9
    Last Post: 06-06-2009, 02:10 AM
  5. Can you read player names out of process?
    By sweeper18 in forum WoW Memory Editing
    Replies: 10
    Last Post: 07-06-2008, 08:54 PM
All times are GMT -5. The time now is 01:36 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search