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

User Tag List

Page 3 of 4 FirstFirst 1234 LastLast
Results 31 to 45 of 52
  1. #31
    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)
    Originally Posted by TOM_RUS View Post
    Code:
            [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_EFFECT_INDEX, ArraySubType = UnmanagedType.I4)]
            public int[] EffectBaseDice;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_EFFECT_INDEX, ArraySubType = UnmanagedType.R4)]
            public float[] EffectDicePerLevel;
    were removed in 3.3.3 patch, but you commented out
    Code:
            //[MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_EFFECT_INDEX, ArraySubType = UnmanagedType.I4)]
            //public int[] EffectMiscValue;
            //[MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_EFFECT_INDEX, ArraySubType = UnmanagedType.I4)]
            //public int[] EffectMiscValueB;
    for some reason...
    As I said; I didn't really research what was actually removed.

    Thanks for the correction though.

    [C#][Copy/Pasta] Out of process DBC reading
  2. #32
    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)
    Would I be correct in assuming that Flag96 is simply uint[3]?

    Got this idea from: src/shared/Util.h | Assembla

    Hadn't seen this type before. Thanks!
    https://tanaris4.com

  3. #33
    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)
    Yes, it's a flag with 96 bits. (AKA: 3x integers)

  4. #34
    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)
    @Apoc - thx

    For those that care, the Struct did NOT change in 3.3.3a for OS X, not really sure why but ran some tests for around an hour. Here it is:
    tanaris4 private pastebin - collaborative debugging tool

    I'll do a formal write up on the OS X implementation later for those that are curious.

    Edit: For those reading this thread, this will aid in determining the flags for things like Mechanic, SchoolMask, etc...

    http://trinitycore.googlecode.com/hg...a4bf9b85b81438
    Last edited by Tanaris4; 04-12-2010 at 10:13 PM.
    https://tanaris4.com

  5. #35
    Nesox's Avatar ★ Elder ★
    Reputation
    1280
    Join Date
    Mar 2007
    Posts
    1,238
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    shouldn't this

    Code:
    
    
    Code:
    public class DbTable
    {
        private readonly IntPtr _tablePtr;
        private WoWClientDb _nativeDb;
    
         internal DbTable(IntPtr tablePtr)
             {
             _tablePtr = tablePtr;
                     _nativeDb = Memory.ReadStruct<WoWClientDb>(_tablePtr);
             }
    }

    be like this?


    Code:
    public class DbTable
    {
             private readonly IntPtr _tablePtr;
             private WoWClientDb _nativeDb;
    
             internal DbTable(IntPtr tablePtr)
             {
                     _tablePtr = tablePtr;
                     _nativeDb = Memory.ReadStruct<WoWClientDb>(_tablePtr - 0x18);
             }
    }
    Last edited by Nesox; 04-14-2010 at 11:42 AM.

  6. #36
    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)
    Originally Posted by Nesox View Post
    shouldn't this

    public class DbTable
    {
    private readonly IntPtr _tablePtr;
    private WoWClientDb _nativeDb;

    internal DbTable(IntPtr tablePtr)
    {
    _tablePtr = tablePtr;
    _nativeDb = Memory.ReadStruct<WoWClientDb>(_tablePtr);
    }
    }

    be like this?

    public class DbTable
    {
    private readonly IntPtr _tablePtr;
    private WoWClientDb _nativeDb;

    internal DbTable(IntPtr tablePtr)
    {
    _tablePtr = tablePtr;
    _nativeDb = Memory.ReadStruct<WoWClientDb>(_tablePtr - 0x1;
    }
    }

    No. Re-read the code. Only packed DBCs require the -0x18 address. All others should stay the way they are.

  7. #37
    Nesox's Avatar ★ Elder ★
    Reputation
    1280
    Join Date
    Mar 2007
    Posts
    1,238
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Apoc View Post
    No. Re-read the code. Only packed DBCs require the -0x18 address. All others should stay the way they are.
    Ok, im pretty sure i couldn't get it working tho without changing that tho.

  8. #38
    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)
    I don't use the -0x18 on my mac, but I've only tested Spell.dbc for packed databases, not sure which others are. Still confused by it, but my read works now yay!
    https://tanaris4.com

  9. #39
    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)
    So sad item names aren't stored in there (or am I missing something?)

    Looks like you get them through DBItemCache_GetInfoBlockByID amirite?
    https://tanaris4.com

  10. #40
    MaiN's Avatar Elite User
    Reputation
    335
    Join Date
    Sep 2006
    Posts
    1,047
    Thanks G/R
    0/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Tanaris4 View Post
    So sad item names aren't stored in there (or am I missing something?)

    Looks like you get them through DBItemCache_GetInfoBlockByID amirite?
    Yes, item names aren't stored in there. They're provided by the server IIRC.
    [16:15:41] Cypher: caus the CPU is a dick
    [16:16:07] kynox: CPU is mad
    [16:16:15] Cypher: CPU is all like
    [16:16:16] Cypher: whatever, i do what i want

  11. #41
    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)
    Originally Posted by MaiN View Post
    Yes, item names aren't stored in there. They're provided by the server IIRC.
    Errr....

    Code:
            [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
            public struct ItemInfo
            {
                /// int
                public int EntryLength;
    
                /// int
                public int ClassId;
    
                /// int
                public int SubClassId;
    
                /// int
                public int Unk0;
    
                /// int
                public int DisplayInfoId;
    
                /// int
                public int Rarity;
    
                /// int
                public int TypeFlags;
    
                /// int
                public int BuyPrice;
    
                /// int
                public int Faction;
    
                /// int
                public int SellPrice;
    
                /// int
                public int EquipSlot;
    
                /// int
                public int AllowedClasses;
    
                /// int
                public int AllowedRaces;
    
                /// int
                public int ItemLevel;
    
                /// int
                public int RequiredLevel;
    
                /// int
                public int RequiredSkill;
    
                /// int
                public int RequiredSkillLevel;
    
                /// int
                public int RequireSpell;
    
                /// int
                public int RequiredHonorRank;
    
                /// int
                public int RequiredCityRank;
    
                /// int
                public int RequiredReputationFaction;
    
                /// int
                public int RequiredReputationRank;
    
                /// int
                public int UniqueCount;
    
                /// int
                public int MaxStackSize;
    
                /// int
                public int BagSlots;
    
                /// int
                public int NumberOfStats;
    
                /// int[10]
                [MarshalAs(UnmanagedType.ByValArray, SizeConst = 10, ArraySubType = UnmanagedType.I4)]
                public int[] StatId;
    
                /// int[10]
                [MarshalAs(UnmanagedType.ByValArray, SizeConst = 10, ArraySubType = UnmanagedType.I4)]
                public int[] StatValue;
    
                /// int[2]
                [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I4)]
                public int[] Unk1;
    
                /// float[2]
                [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.R4)]
                public float[] DamageMin;
    
                /// float[2]
                [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.R4)]
                public float[] DamageMax;
    
                /// int[2]
                [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I4)]
                public int[] DamageType;
    
                /// int
                public int ResistPhysical_Armor;
    
                /// int
                public int ResistHoly;
    
                /// int
                public int ResistFire;
    
                /// int
                public int ResistNature;
    
                /// int
                public int ResistFrost;
    
                /// int
                public int ResistShadow;
    
                /// int
                public int ResistArcane;
    
                /// int
                public int WeaponDelay;
    
                /// int
                public int AmmoType;
    
                /// float
                public float RangeModifier;
    
                /// int[5]
                [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I4)]
                public int[] SpellId;
    
                /// int[5]
                [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I4)]
                public int[] SpellTriggerId;
    
                /// int[5]
                [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I4)]
                public int[] SpellCharges;
    
                /// int[5]
                [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I4)]
                public int[] SpellCooldown;
    
                /// int[5]
                [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I4)]
                public int[] SpellCategory;
    
                /// int[5]
                [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I4)]
                public int[] SpellCategoryCooldown;
    
                /// int
                public int BondId;
    
                /// char*
                [MarshalAs(UnmanagedType.LPStr)]
                public string Description;
    
                /// int
                public int BookTextId;
    
                /// int
                public int BookPages;
    
                /// int
                public int BookStationaryId;
    
                /// int
                public int BeginQuestId;
    
                /// int
                public int LockPickSkillRequired;
    
                /// int
                public int MaterialId;
    
                /// int
                public int SheathId;
    
                /// int
                public int RandomPropertyId;
    
                /// int
                public int RandomPropertyId2;
    
                /// int
                public int BlockValue;
    
                /// int
                public int ItemSetId;
    
                /// int
                public int DurabilityValue;
    
                /// int
                public int ItemAreaId;
    
                /// int
                public int ItemMapId;
    
                /// int
                public int BagFamily;
    
                /// int
                public int totemCategory;
    
                /// int[3]
                [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I4)]
                public int[] SocketColor;
    
                /// int[3]
                [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I4)]
                public int[] SocketUnk;
    
                /// int
                public int SocketBonus;
    
                /// int
                public int GemProperties;
    
                /// int
                public int DisenchantSkillLevel;
    
                /// float
                public float ArmorDamageModifier;
    
                /// int
                public int ItemExtendedCost;
    
                /// int
                public int ItemLimitId;
    
                /// int
                public int Unk2;
    
                /// char*
                [MarshalAs(UnmanagedType.LPStr)]
                public string Name;
            }
    The cache stores the name... you just need to 'request' it from the server, or have seen the item already (so it's in your cache already).

    If that's what you meant by 'the server has to send it' then I retract my response!

  12. #42
    MaiN's Avatar Elite User
    Reputation
    335
    Join Date
    Sep 2006
    Posts
    1,047
    Thanks G/R
    0/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Apoc View Post
    Errr....

    Code:
    -snip-
    The cache stores the name... you just need to 'request' it from the server, or have seen the item already (so it's in your cache already).

    If that's what you meant by 'the server has to send it' then I retract my response!
    Oh yeah, you're right. I was confusing it with the actual entry in the Item.dbc. In that entry it doesn't have the name, and strangely, the entry in Spell.dbc does (which is why I could remember it).
    [16:15:41] Cypher: caus the CPU is a dick
    [16:16:07] kynox: CPU is mad
    [16:16:15] Cypher: CPU is all like
    [16:16:16] Cypher: whatever, i do what i want

  13. #43
    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)

    Wow_Use_Spell_Unpack

    Well i have the DBC reader working to get spell names, but I have to force the clientdbunpack routine.

    I updated:

    CLIENT_DB_REGISTER_BASE = 0x0066A970;

    and I had to add

    public T GetField<T>(uint index) where T : struct

    I got compile error T can not be nullable.

    I loaded up 3.3.0 (CLIENT_DB_REGISTER_BASE = 0x005C8E80 Binary)
    into IDA and could not find any references to WOW_USE_SPELL_UNPACK = 0xC775D0.

    Any hints how to figure out what the 3.3.3a version of WOW_USE_SPELL_UNPACK is?

    If anybody has question on how to get this far, let me know.

    thanks,


  14. #44
    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)
    Originally Posted by Apoc View Post
    Check the ClientDb__GetLocalizedRow func. It's the first 'call' to another func.

    One simply does a memcpy, the other does the unpacking.
    You really need to read the thread.

    Code:
    signed int __thiscall ClientDb_GetLocalizedRow(WoWClientDB *this, int recId, PVOID lpBuffer)
    {
      int v3; // edx@1
      LPVOID *v4; // eax@3
      signed int result; // eax@5
    
      v3 = this->minIndex;
      if ( recId >= v3 && recId <= this->maxIndex && (v4 = (LPVOID *)&this->Rows[recId - v3], *v4) )
      {
        if ( byte_BB9808 )                          // Unpack DBC files, or just memcpy them
        {
          ClientDb__Unpack(*v4, 0x2A8u, lpBuffer);
          result = 1;
        }
        else
        {
          memcpy(lpBuffer, *v4, 0x2A8u);
          result = 1;
        }
      }
      else
      {
        result = 0;
      }
      return result;
    }

  15. #45
    csin's Avatar Private
    Reputation
    1
    Join Date
    Mar 2010
    Posts
    9
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Nikentic View Post
    I do not like visual basic
    Oh @#$^ someone send an S.O.S this Failboat is taking on water!!!

Page 3 of 4 FirstFirst 1234 LastLast

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 09:59 PM. 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