Problems reading DB_Spell data. menu

User Tag List

Results 1 to 8 of 8
  1. #1
    akh's Avatar Member
    Reputation
    4
    Join Date
    Mar 2008
    Posts
    39
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problems reading DB_Spell data.

    Hi.

    I use the WoWX framework to get some data from the client databases using the CClientDB::GetRow function. In most cases this works like a charm, but when I try to read data from DB_Spell I get some strange output. This picture should explain what im talking about.



    When I read data from DB_ItemRandomProperties (left) it seems fine and the data looks like the data in MyWarcraftStudio, but when I read the data from DB_Spell (right) the data is all screwed up.

    Any ideas to how Im supposed to read this data propperbly?

    Problems reading DB_Spell data.
  2. #2
    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)
    From memory field numbers are zero based in-memory. Not sure if that helps you at all but other than that I can't think of anything off the top of my head.

    BTW: They both look wrong to me. I have not had any troubles reading from DBC files in memory yet though.

  3. #3
    akh's Avatar Member
    Reputation
    4
    Join Date
    Mar 2008
    Posts
    39
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What do you mean that they both look wrong to you?

    Here is a test I made, it prints the first 6 fields of a db row, one from DB_Spell and one from ItemRandomProperties:
    Code:
    CClientDB * db = gpWoWX->GetClientDB()->GetDatabase( DB_Spell );
    CClientDB::CRow *  dbrow = db->GetRow( 1 );
    gpWoWX->GetLog()->Add("DB_Spell row 5");
    for (int i = 0; i < 6; i++)
    	gpWoWX->GetLog()->Add("%i: %i", i, dbrow->GetField(i));
    
    db = gpWoWX->GetClientDB()->GetDatabase( DB_ItemRandomProperties );
    dbrow = db->GetRow( 5 );
    gpWoWX->GetLog()->Add("DB_ItemRandomProperties row 5");
    for (int i = 0; i < 6; i++)
    	gpWoWX->GetLog()->Add("%i: %i", i, dbrow->GetField(i));
    This is the output:
    Code:
    [15:31:50]:  DB_Spell row 1
    [15:31:50]:  0: 150994951
    [15:31:50]:  1: 218103815
    [15:31:50]:  2: 419430501
    [15:31:50]:  3: 218103818
    [15:31:50]:  4: 1426063361
    [15:31:50]:  5: 196607
    [15:31:50]:  DB_ItemRandomProperties row 5
    [15:31:50]:  0: 173437961
    [15:31:50]:  1: 79
    [15:31:50]:  2: 0
    [15:31:50]:  3: 0
    [15:31:50]:  4: 0
    [15:31:50]:  5: 0
    Last edited by akh; 10-14-2008 at 08:44 AM.

  4. #4
    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)
    Oh i see what you're doing. And I know why its wrong.

    You're starting at row 0 and assuming it just goes up by 1. Thats not how it works. Notice in DB_Spell the IDs are 1,3,4,5,7,10,etc. You need to use the ID as the row number.

    You can enumerate DBCs easily by reading the max/min row information from the class and looping through all the values inbetween, the doing a null check on the row before using it.

  5. #5
    akh's Avatar Member
    Reputation
    4
    Join Date
    Mar 2008
    Posts
    39
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Cypher View Post
    Oh i see what you're doing. And I know why its wrong.

    You're starting at row 0 and assuming it just goes up by 1. Thats not how it works. Notice in DB_Spell the IDs are 1,3,4,5,7,10,etc. You need to use the ID as the row number.

    You can enumerate DBCs easily by reading the max/min row information from the class and looping through all the values inbetween, the doing a null check on the row before using it.
    Im not starting from row 0, im starting from row 5 in DB_ItemRandomProperties and from row 1 in DB_Spell.

    The addresses im using is:
    DB_Spell = 0x16B, // 0x00BA0BE0
    DB_ItemRandomProperties = 0x135, // 0x00BA0460
    RegisterBase_ClientDB = 0x00573C90
    GetRow_ClientDB = 0x004745A0

  6. #6
    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)
    lol @ ure new avatar cypher

  7. #7
    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)
    Ooooooook. I see what you're doing now.

    My bad, misread.

    Please post your DBC enum, you may be using the wrong DB index.

    @Nesox

    My new avatar is awesome!

  8. #8
    akh's Avatar Member
    Reputation
    4
    Join Date
    Mar 2008
    Posts
    39
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Cypher View Post
    Ooooooook. I see what you're doing now.

    My bad, misread.

    Please post your DBC enum, you may be using the wrong DB index.

    @Nesox

    My new avatar is awesome!
    Here is my DBC enum. Its from one of the IDA scripts bobbysing posted on Game Deception forum.

    Code:
    enum eClientDB
        {
            DB_Startup_Strings = 0xF0C, // 0x0090F2B0
            DB_Spell = 0x16B, // 0x00BA0BE0
            DB_ItemDisplayInfo = 0x131, // 0x00BA03DC
            DB_CreatureModelData = 0x103, // 0x00B9FE1C
            DB_AnimationData = 0x0E7, // 0x00B9FA9C
            DB_AreaPOI = 0x0E8, // 0x00B9FA13CBC
            DB_AreaTable = 0x0E9, // 0x00B9FADC
            DB_AreaTrigger = 0x0EA, // 0x00B9FAFC
            DB_AttackAnimKits = 0x0EB, // 0x00B9FB1C
            DB_AttackAnimTypes = 0x0EC, // 0x00B9FB3C
            DB_AuctionHouse = 0x0ED, // 0x00B9FB5C
            DB_BankBagSlotPrices = 0x0EE, // 0x00B9FB7C
            DB_BattlemasterList = 0x0EF, // 0x00B9FB9C
            DB_CameraShakes = 0x0F0, // 0x00B9FBBC
            DB_Cfg_Categories = 0x0F1, // 0x00B9FBDC
            DB_Cfg_Configs = 0x0F2, // 0x00B9FBFC
            DB_CharBaseInfo = 0x0F3, // 0x00B9FC1C
            DB_CharHairGeosets = 0x0F4, // 0x00B9FC3C
            DB_CharStartOutfit = 0x0F6, // 0x00B9FC7C
            DB_CharTitles = 0x0F7, // 0x00B9FC9C
            DB_CharVariations = 0x0F8, // 0x00B9FCBC
            DB_CharacterFacialHairStyles = 0x0F9, // 0x00B9FCDC
            DB_ChatChannels = 0x0FA, // 0x00B9FCFC
            DB_ChrClasses = 0x0FC, // 0x00B9FD3C
            DB_ChrRaces = 0x0FD, // 0x00B9FD5C
            DB_CinematicCamera = 0x0FE, // 0x00B9FD7C
            DB_CinematicSequences = 0x0FF, // 0x00B9FD9C
            DB_CreatureDisplayInfoExtra = 0x101, // 0x00B9FDBC
            DB_CreatureDisplayInfo = 0x100, // 0x00B9FDDC
            DB_CreatureFamily = 0x102, // 0x00B9FDFC
            DB_CreatureSoundData = 0x104, // 0x00B9FE3C
            DB_CreatureSpellData = 0x105, // 0x00B9FE5C
            DB_CreatureType = 0x106, // 0x00B9FE7C
            DB_DeathThudLookups = 0x107, // 0x00B9FE9C
            DB_DeclinedWord = 0x108, // 0x00B9FEBC
            DB_DeclinedWordCases = 0x109, // 0x00B9FEDC
            DB_DurabilityCosts = 0x10A, // 0x00B9FEFC
            DB_DurabilityQuality = 0x10B, // 0x00B9FF1C
            DB_Emotes = 0x10C, // 0x00B9FF3C
            DB_EmotesTextData = 0x10E, // 0x00B9FF5C
            DB_EmotesTextSound = 0x10F, // 0x00B9FF7C
            DB_EmotesText = 0x10D, // 0x00B9FF9C
            DB_EnvironmentalDamage = 0x110, // 0x00B9FFBC
            DB_Exhaustion = 0x111, // 0x00B9FFDC
            DB_FactionGroup = 0x113, // 0x00B9FFFC
            DB_Faction = 0x112, // 0x00BA001C
            DB_FactionTemplate = 0x114, // 0x00BA003C
            DB_FootprintTextures = 0x115, // 0x00BA005C
            DB_FootstepTerrainLookup = 0x116, // 0x00BA007C
            DB_GameObjectArtKit = 0x117, // 0x00BA009C
            DB_GameObjectDisplayInfo = 0x118, // 0x00BA00BC
            DB_GameTables = 0x119, // 0x00BA00DC
            DB_GameTips = 0x11A, // 0x00BA00FC
            DB_GemProperties = 0x11B, // 0x00BA011C
            DB_GMSurveyCurrentSurvey = 0x11C, // 0x00BA013C
            DB_GMSurveyQuestions = 0x11D, // 0x00BA015C
            DB_GMSurveySurveys = 0x11E, // 0x00BA017C
            DB_GMTicketCategory = 0x11F, // 0x00BA019C
            DB_GroundEffectDoodad = 0x120, // 0x00BA01BC
            DB_GroundEffectTexture = 0x121, // 0x00BA01DC
            DB_gtCombatRatings = 0x122, // 0x00BA01FC
            DB_gtChanceToMeleeCrit = 0x123, // 0x00BA021C
            DB_gtChanceToMeleeCritBase = 0x124, // 0x00BA023C
            DB_gtChanceToSpellCrit = 0x125, // 0x00BA025C
            DB_gtChanceToSpellCritBase = 0x126, // 0x00BA027C
            DB_gtNPCManaCostScaler = 0x127, // 0x00BA029C
            DB_gtOCTRegenHP = 0x128, // 0x00BA02BC
            DB_gtOCTRegenMP = 0x129, // 0x00BA02DC
            DB_gtRegenHPPerSpt = 0x12A, // 0x00BA02FC
            DB_gtRegenMPPerSpt = 0x12B, // 0x00BA031C
            DB_HelmetGeosetVisData = 0x12C, // 0x00BA033C
            DB_Item = 0x12D, // 0x00BA035C
            DB_ItemBagFamily = 0x12E, // 0x00BA037C
            DB_ItemClass = 0x12F, // 0x00BA039C
            DB_ItemCondExtCosts = 0x130, // 0x00BA03BC
            DB_ItemExtendedCost = 0x132, // 0x00BA0400
            DB_ItemGroupSounds = 0x133, // 0x00BA0420
            DB_ItemPetFood = 0x134, // 0x00BA0440
            DB_ItemRandomProperties = 0x135, // 0x00BA0460
            DB_ItemRandomSuffix = 0x136, // 0x00BA0480
            DB_ItemSet = 0x137, // 0x00BA04A0
            DB_ItemSubClassMask = 0x139, // 0x00BA04C0
            DB_ItemSubClass = 0x138, // 0x00BA04E0
            DB_ItemVisualEffects = 0x13A, // 0x00BA0500
            DB_ItemVisuals = 0x13B, // 0x00BA0520
            DB_LanguageWords = 0x13C, // 0x00BA0540
            DB_Languages = 0x13D, // 0x00BA0560
            DB_LfgDungeons = 0x13E, // 0x00BA0580
            DB_LightFloatBand = 0x140, // 0x00BBF5F4
            DB_LightIntBand = 0x141, // 0x00BBF5D0
            DB_LightParams = 0x142, // 0x00BBF618
            DB_Light = 0x13F, // 0x00BBF638
            DB_LightSkybox = 0x143, // 0x00BBF5B0
            DB_LiquidType = 0x144, // 0x00BA05A0
            DB_LoadingScreens = 0x145, // 0x00BA05C0
            DB_LoadingScreenTaxiSplines = 0x146, // 0x00BA05E0
            DB_Lock = 0x147, // 0x00BA0600
            DB_LockType = 0x148, // 0x00BA0620
            DB_MailTemplate = 0x149, // 0x00BA0640
            DB_Map = 0x14A, // 0x00BA0660
            DB_Material = 0x14B, // 0x00BA0680
            DB_NameGen = 0x14C, // 0x00BA06A0
            DB_NPCSounds = 0x14D, // 0x00BA06C0
            DB_ChatProfanity = 0x0FB, // 0x00B9FD1C
            DB_Package = 0x150, // 0x00BA0720
            DB_PageTextMaterial = 0x151, // 0x00BA0740
            DB_PaperDollItemFrame = 0x152, // 0x00BA0760
            DB_ParticleColor = 0x153, // 0x00BA0780
            DB_PetLoyalty = 0x154, // 0x00BA07A0
            DB_PetPersonality = 0x155, // 0x00BA07C0
            DB_QuestInfo = 0x156, // 0x00BA07E0
            DB_QuestSort = 0x157, // 0x00BA0800
            DB_RandPropPoints = 0x159, // 0x00BA0840
            DB_Resistances = 0x158, // 0x00BA0820
            DB_ServerMessages = 0x15A, // 0x00BA0860
            DB_SheatheSoundLookups = 0x15B, // 0x00BA0880
            DB_SkillCostsData = 0x15C, // 0x00BA08A0
            DB_SkillLineAbility = 0x15D, // 0x00BA08C0
            DB_SkillLine = 0x15F, // 0x00BA0900
            DB_SkillLineCategory = 0x15E, // 0x00BA08E0
            DB_SkillRaceClassInfo = 0x160, // 0x00BA0920
            DB_SkillTiers = 0x161, // 0x00BA0940
            DB_SoundAmbience = 0x162, // 0x00BA0960
            DB_SoundEntries = 0x163, // 0x00BA0980
            DB_SoundProviderPreferences = 0x164, // 0x00BA09A0
            DB_SoundSamplePreferences = 0x165, // 0x00BA09C0
            DB_SoundWaterType = 0x166, // 0x00BA09E0
            DB_SpamMessages = 0x167, // 0x00BA0A00
            DB_SpellCastTimes = 0x168, // 0x00BA0A20
            DB_SpellCategory = 0x169, // 0x00BA0A40
            DB_SpellChainEffects = 0x16A, // 0x00BA0A60
            DB_SpellDispelType = 0x16C, // 0x00BA0A80
            DB_SpellDuration = 0x16D, // 0x00BA0AA0
            DB_SpellEffectCameraShakes = 0x16E, // 0x00BA0AC0
            DB_SpellFocusObject = 0x16F, // 0x00BA0AE0
            DB_SpellIcon = 0x170, // 0x00BA0B00
            DB_SpellItemEnchantment = 0x171, // 0x00BA0B20
            DB_SpellItemEnchantmentCondition = 0x172, // 0x00BA0B40
            DB_SpellMechanic = 0x173, // 0x00BA0B60
            DB_SpellMissileMotion = 0x174, // 0x00BA0B80
            DB_SpellRadius = 0x175, // 0x00BA0BA0
            DB_SpellRange = 0x176, // 0x00BA0BC0
            DB_SpellShapeshiftForm = 0x177, // 0x00BA0C04
            DB_SpellVisualEffectName = 0x179, // 0x00BA0C24
            DB_SpellVisualKit = 0x17A, // 0x00BA0C44
            DB_SpellVisual = 0x178, // 0x00BA0C64
            DB_StableSlotPrices = 0x17B, // 0x00BA0C84
            DB_Stationery = 0x17C, // 0x00BA0CA4
            DB_StringLookups = 0x17D, // 0x00BA0CC4
            DB_SummonProperties = 0x17E, // 0x00BA0CE4
            DB_Talent = 0x17F, // 0x00BA0D04
            DB_TalentTab = 0x180, // 0x00BA0D24
            DB_TaxiNodes = 0x181, // 0x00BA0D44
            DB_TaxiPathNode = 0x183, // 0x00BA0D64
            DB_TaxiPath = 0x182, // 0x00BA0D84
            DB_TerrainType = 0x184, // 0x00BA0DA4
            DB_TerrainTypeSounds = 0x185, // 0x00BA0DC4
            DB_TotemCategory = 0x186, // 0x00BA0DE4
            DB_TransportAnimation = 0x187, // 0x00BA0E04
            DB_TransportPhysics = 0x188, // 0x00BA0E24
            DB_UISoundLookups = 0x189, // 0x00BA0E44
            DB_UnitBloodLevels = 0x18B, // 0x00BA0E64
            DB_UnitBlood = 0x18A, // 0x00BA0E84
            DB_VocalUISounds = 0x18C, // 0x00BA0EA4
            DB_WeaponImpactSounds = 0x18E, // 0x00BA0EE4
            DB_WeaponSwingSounds2 = 0x18F, // 0x00BA0F04
            DB_Weather = 0x190, // 0x00BA0F24
            DB_WorldMapArea = 0x191, // 0x00BA0F44
            DB_WorldMapContinent = 0x193, // 0x00BA0F64
            DB_WorldMapOverlay = 0x194, // 0x00BA0F84
            DB_WorldMapTransforms = 0x192, // 0x00BA0FA4
            DB_WorldSafeLocs = 0x195, // 0x00BA0FC4
            DB_WorldStateUI = 0x196, // 0x00BA0FE4
            DB_NamesProfanity = 0x14E, // 0x00BA06E0
            DB_NamesReserved = 0x14F, // 0x00BA0700
            DB_CharSections = 0x0F5, // 0x00B9FC5C
            DB_ZoneIntroMusicTable = 0x197, // 0x00BA1004
            DB_ZoneMusic = 0x198, // 0x00BA1024
            DB_WorldStateZoneSounds = 0x199, // 0x00BA1044
            DB_WMOAreaTable = 0x18D, // 0x00BA0EC4
            DB_VideoHardware = 0x0E2, // 0x00BA5D14
    
            DB_COUNT = 0x0B5
        }

Similar Threads

  1. Reading WOW data
    By HeRog in forum WoW Memory Editing
    Replies: 3
    Last Post: 02-29-2008, 09:54 AM
  2. Guild Wars Problem! (READ!)
    By XaVe in forum Gaming Chat
    Replies: 20
    Last Post: 09-03-2007, 08:50 PM
  3. OMFG! Big Acc Scam Problem! READ THIS!
    By Jones4ever in forum World of Warcraft General
    Replies: 23
    Last Post: 02-06-2007, 10:57 PM
  4. Problem with my Data folder?
    By Sithe in forum WoW ME Questions and Requests
    Replies: 3
    Last Post: 01-01-2007, 05:33 PM
All times are GMT -5. The time now is 04:08 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