Problem 2 :) menu

User Tag List

Thread: Problem 2 :)

Results 1 to 6 of 6
  1. #1
    kajko's Avatar Member
    Reputation
    4
    Join Date
    Oct 2009
    Posts
    48
    Thanks G/R
    3/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem 2 :)

    Hello,

    me again

    I can not make this code work, i do not know why, it looks ok, and i did search and compare my code with what i was able to find on net and can not find what is wrong with it.
    If any1 can see where is the problem i would be grateful.


    void WOWBase::EnumAuras( UINT32 BaseAddress )
    {
    int auraCount1 = m_wowMem.ReadUINT32( BaseAddress + UnitBaseGetUnitAura_AURA_COUNT_1 );
    int auraCount2 = m_wowMem.ReadUINT32( BaseAddress + UnitBaseGetUnitAura_AURA_COUNT_2 );

    int AuraCount = auraCount1 ? auraCount1 : auraCount2;
    UINT32 TableBase = m_wowMem.ReadUINT32(BaseAddress + (auraCount1 ? UnitBaseGetUnitAura_AURA_TABLE_1 : UnitBaseGetUnitAura_AURA_TABLE_2));

    UINT32 spellID;
    for (int i = 0; i < AuraCount; ++i)
    {
    spellID = m_wowMem.ReadUINT32(TableBase + i * UnitBaseGetUnitAura_AURA_SIZE + UnitBaseGetUnitAura_AURA_SPELL_ID ); // Offsets::AuraOffset);
    int t = 0;
    }
    }


    Kajko

    Problem 2 :)
  2. #2
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why on earth would you do out of process programming in C++? Everybody knows managed languages are better >.>

  3. #3
    psyf4's Avatar Private
    Reputation
    2
    Join Date
    Jul 2010
    Posts
    9
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did you try debugging?
    Even printing out the information and looking at the memory yourself will tell you what's wrong.
    Also, you didn't put all your code so we can't tell you which TABLE is wrong, but i'd bet it's either UnitBaseGetUnitAura_AURA_TABLE_1 / UnitBaseGetUnitAura_AURA_TABLE_2. Let me guess, your code works on a level 1 but not on a level 80? Then look at how you set your TABLE_2 and compare it to the code you thought looked the same, you'll see it doesn't I'm very strongly guessing it isn't using a ternary logic. Yes, it CAN, but should it? Well, you got a bug because of it.
    If all else fails, do it yourself from scratch so you can understand what you're doing. That's how I fixed what I'm guessing is the same mistake you made.

    When I started coding this, I would print out all the information around the information I'm using to see what it looks like; it will become pretty obvious if you're using a pointer as data instead of what it points to (likely your problem from what your code says, and my specific guess is above).
    Last edited by psyf4; 05-29-2011 at 07:58 PM.

  4. #4
    kajko's Avatar Member
    Reputation
    4
    Join Date
    Oct 2009
    Posts
    48
    Thanks G/R
    3/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hello,

    offsets i use:


    UnitBaseGetUnitAura_AURA_COUNT_1 = 0xE90;
    UnitBaseGetUnitAura_AURA_COUNT_2 = 0xC14;
    UnitBaseGetUnitAura_AURA_TABLE_1 = 0xC10;
    UnitBaseGetUnitAura_AURA_TABLE_2 = 0xC18;
    UnitBaseGetUnitAura_AURA_SIZE = 0x28;
    UnitBaseGetUnitAura_AURA_SPELL_ID = 0x8;
    UnitBaseGetUnitAura_AURA_STACK = 0xE;

    and base address is take from objbase + UnitFieldAddress ( ofs: 0x08 )


    ...
    and it does look the same
    ...

    Kajko

    ---------- Post added at 09:20 PM ---------- Previous post was at 08:57 PM ----------

    Got it:


    void WOWBase::EnumAuras( UINT32 BaseAddress )
    {
    int auraCount;
    UINT32 TableBase;

    m_wowMem.ReadVal( BaseAddress + m_wowOffsets.UnitBaseGetUnitAura_AURA_COUNT_1, auraCount );
    TableBase = BaseAddress + m_wowOffsets.UnitBaseGetUnitAura_AURA_TABLE_1;
    if( auraCount == -1 )
    {
    m_wowMem.ReadVal( BaseAddress + m_wowOffsets.UnitBaseGetUnitAura_AURA_COUNT_2, auraCount );
    TableBase = BaseAddress + m_wowOffsets.UnitBaseGetUnitAura_AURA_TABLE_2;
    }

    UINT32 spellID;
    for (int i = 0; i < auraCount; ++i)
    {
    spellID = m_wowMem.ReadUINT32(TableBase + i * m_wowOffsets.UnitBaseGetUnitAura_AURA_SIZE + m_wowOffsets.UnitBaseGetUnitAura_AURA_SPELL_ID );
    .....
    }
    }


    BaseAddress is obj base address.

  5. #5
    psyf4's Avatar Private
    Reputation
    2
    Join Date
    Jul 2010
    Posts
    9
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So does "Got it" mean you understand now? I'm a python programmer so I'm not certain where the value goes from ReadVal, but I can guess the latter code works by only reading a second time if auraCount == -1 (to anyone else trying to figure out this problem, make sure you understand that, and you'll have your answer; for the rest, you can of course just copy code, but that's a discussion for another day). Personally I wrote mine in python to force me understanding what's going on!

    We can't learn much from being told answers directly without work, but let me know if it still doesn't work. At least people here can show you the way to learn yourself (I myself have only really learned from reading the hints and tricks all over this forum).
    Well done if you figured it out yourself and understand the problem!

  6. #6
    kajko's Avatar Member
    Reputation
    4
    Join Date
    Oct 2009
    Posts
    48
    Thanks G/R
    3/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi

    Problem was caused by copypasta prev line while writing:

    int auraCount1 = m_wowMem.ReadUINT32( BaseAddress + UnitBaseGetUnitAura_AURA_COUNT_1 );
    =>> error ==> UINT32 TableBase = m_wowMem.ReadUINT32(BaseAddress + (auraCount1 ? UnitBaseGetUnitAura_AURA_TABLE_1 : UnitBaseGetUnitAura_AURA_TABLE_2));

    I calculated the offset, and i did ReadUINT32 from that address as new address , it should have been
    UINT32 TableBase = BaseAddress + (auraCount1 ? UnitBaseGetUnitAura_AURA_TABLE_1 : UnitBaseGetUnitAura_AURA_TABLE_2);
    only...

    Hope i clarified things enough for the rest of you having same problem.

    Kajko

Similar Threads

  1. Problem with CE.
    By Eldretch in forum World of Warcraft General
    Replies: 1
    Last Post: 08-08-2006, 06:49 PM
  2. realm list problem
    By robtuner in forum World of Warcraft General
    Replies: 2
    Last Post: 07-21-2006, 09:08 AM
  3. I have problem with BHW 3.0
    By sunrize1 in forum World of Warcraft General
    Replies: 1
    Last Post: 07-17-2006, 08:49 AM
  4. wow emu problem
    By bezike in forum World of Warcraft General
    Replies: 0
    Last Post: 07-09-2006, 04:45 PM
  5. Site problems
    By Shanaar in forum Community Chat
    Replies: 10
    Last Post: 05-14-2006, 01:15 AM
All times are GMT -5. The time now is 06:21 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