Quest Information - Determining if a quest is complete menu

User Tag List

Results 1 to 11 of 11
  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)

    Quest Information - Determining if a quest is complete

    So I've done a few hours worth of attempted reversing on the mac + windows binary to better understand what is actually going on within API GetQuestLogTitle - WoWWiki - Your guide to the World of Warcraft. Seems this is the only function I could find which actually references if a quest is completed or not.

    I've got decently far, I'm found some checks to determine if a quest is NOT complete (not 100%, obviously or I wouldn't be posting ) but I'm struggling with the full reversing. Here is what I've been able to name thus far: tanaris4 private pastebin - collaborative debugging tool

    The function I *believe* marks quest completion is at 0x7829C0 on windows. What I wanted to ask is if anyone has reversed this yet, and could verify what exactly that function is doing. It looks like it's taking a peek at the DBC to pull out some quest information, make a comparison to data in PlayerFields &(baseAddress + 0xFF4) then determine if the quest is completed.

    But I'm not entirely sure my analysis is correct. Can anyone give me some insight here?
    Last edited by Tanaris4; 04-07-2010 at 10:20 PM.
    https://tanaris4.com

    Quest Information - Determining if a quest is complete
  2. #2
    Ryns's Avatar Member
    Reputation
    19
    Join Date
    Oct 2009
    Posts
    24
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Some time ago I was experimenting with mem-reading quest completion with some success.

    http://www.mmowned.com/forums/wow-me...on-status.html

    It appeared that there is a flag on the player quest log structure which indicates if its complete or not. It worked enough to let me automate detecting quest-completion for each part of the Wintersaber Trainers series of quests.

  3. #3
    TOM_RUS's Avatar Legendary
    Reputation
    914
    Join Date
    May 2008
    Posts
    699
    Thanks G/R
    0/52
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Code:
    enum QuestSlotOffsets
    {
        QUEST_ID_OFFSET         = 0,
        QUEST_STATE_OFFSET      = 1,
        QUEST_COUNTS_OFFSET     = 2,                            // 2 and 3
        QUEST_TIME_OFFSET       = 4,
        MAX_QUEST_OFFSET = 5
    };
    
    uint32 GetQuestSlotState(uint16 slot)   const { return GetUInt32Value(PLAYER_QUEST_LOG_1_1 + slot * MAX_QUEST_OFFSET + QUEST_STATE_OFFSET); }
    
    enum QuestSlotStateMask
    {
        QUEST_STATE_NONE     = 0x0000,
        QUEST_STATE_COMPLETE = 0x0001,
        QUEST_STATE_FAIL     = 0x0002
    };
    Dunno if it still works that way...

  4. #4
    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)
    Thanks for the post Tom, hadn't seen that before, will take a look.

    @Ryan - Yea I had seen that, but I actually didn't get the same results (I was testing w/a daily quest being complete). And w/in the actual WoW binary I didn't see any mention of quest completion functioning this way. So was hoping others would know what the above function was.
    https://tanaris4.com

  5. #5
    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 TOM_RUS View Post
    Code:
    enum QuestSlotOffsets
    {
        QUEST_ID_OFFSET         = 0,
        QUEST_STATE_OFFSET      = 1,
        QUEST_COUNTS_OFFSET     = 2,                            // 2 and 3
        QUEST_TIME_OFFSET       = 4,
        MAX_QUEST_OFFSET = 5
    };
    
    uint32 GetQuestSlotState(uint16 slot)   const { return GetUInt32Value(PLAYER_QUEST_LOG_1_1 + slot * MAX_QUEST_OFFSET + QUEST_STATE_OFFSET); }
    
    enum QuestSlotStateMask
    {
        QUEST_STATE_NONE     = 0x0000,
        QUEST_STATE_COMPLETE = 0x0001,
        QUEST_STATE_FAIL     = 0x0002
    };
    Dunno if it still works that way...
    Close, but it's actual 4x ushorts instead of 2 ints for the 'counts' offset.

    Code:
        [StructLayout(LayoutKind.Sequential)]
        public struct PlayerQuest
        {
            public int ID;
            public StateFlag State;
            [MarshalAs(UnmanagedType.ByValArray,SizeConst = 4)]
            public short[] ObjectiveRequiredCounts;
            public int Time;
    
            public enum StateFlag : uint
            {
                None = 0,
                Complete = 1,
                Failed = 2
            }
        }
    And state is not a flag; it's a 0/1/2 respectively. (Never a 3)

    There are 4 'counts'. One for each objective. (Each being 2bytes; aka: ushort)

    I'm honestly not sure why Blizz doesn't use a single byte for each counter (I've never seen an objective that requires more than 256 of... anything)

  6. #6
    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)
    Thanks Apoc, greatly appreciated. I have a feeling I should have posted here before attempting to reverse for 3 hours heh. O well, I did figure out how to get what quests are available from NPCs (and which you already have), not as hard to determine though. For those that would like to know, just plug in the corresponding Windows offsets from the lua functions:
    tanaris4 private pastebin - collaborative debugging tool
    https://tanaris4.com

  7. #7
    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 - have you 100% verified that State is actually correct? I only ask as my daily fishing quest is complete, and the flag is still 0
    https://tanaris4.com

  8. #8
    luthien23's Avatar Member
    Reputation
    29
    Join Date
    Apr 2009
    Posts
    30
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just tried with the Kobold Camp Cleanup Quest.
    The count is updated each time a kobold vermin is killed.
    And the quest number is correctly stored as 7.
    But all other fields remain at zero regardles off the quest being completed or not.

  9. #9
    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)
    Yea the quest count is updated if you have an objective, but not otherwise (so how can you determine with 100% accuracy if a quest is complete?)

    I'm going to dive into reversing a bit more over the next few days, hopefully will have something to share.
    https://tanaris4.com

  10. #10
    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)
    There are other ways to determine it, but it'd require you to reverse most of the new quest POI stuff. (There's also 'IsQuestComplete' or whatever the lua func is)

  11. #11
    luthien23's Avatar Member
    Reputation
    29
    Join Date
    Apr 2009
    Posts
    30
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In 00C87A70 starts an array which contains quest info. Each item of the array being 48 bytes wide.
    Two values in each item are of interest :
    +00 : Quest identifier. (4 bytes int)
    +2C : Quest status. ( 4 bytes int )
    For quest status I've observed these values so far :
    00000000 -> Empty entry
    00000001 -> Quest uncompleted
    00000002 -> Quest uncompleted
    00000003 -> Quest uncompleted
    FFFFFFFF -> Quest completed

    I don't know the size of the array. But I'm going to guess 25. Thus to check if a quest if completed this would be the code.

    Code:
    #define QUEST_INFO 0x00C87A70
    #define QUEST_INFO_ENTRY_SIZE 48
    #define QUEST_INFO_ID_OFFSET 0x00
    #define QUEST_INFO_STATUS_OFFSET 0x2C
    
    int QuestStatus( int questID )
    {
      int n;
    
      for ( n=0; n<25; n++ )
        if ( readWoWMem_int( QUEST_INFO + QUEST_INFO_ENTRY_SIZE*n + QUEST_INFO_ID_OFFSET ) != 0x00000000 )
          return readWoWMem_int( QUEST_INFO + QUEST_INFO_ENTRY_SIZE*n + QUEST_INFO_STATUS_OFFSET );
      return 0;
    }
    Which would return 0 if the quest is not in the quest log and its status othewise.
    I still have to verify that the array is indeed 25 items long though. So it might not work like that. Also will have to check what is the status value for failed (if it is stored there and not in some other of the 48 bytes)

    Also you might find useful this :

    QUEST_CURRENTLY_SELECTED_IN_QUEST_LOG_WINDOW = [ 00C87A48 ]
    Last edited by luthien23; 04-14-2010 at 12:09 PM.

Similar Threads

  1. Warlock pet without quest/training- completely useless-Flame on!
    By octech in forum World of Warcraft Exploits
    Replies: 14
    Last Post: 11-19-2009, 09:45 AM
  2. [Quest] Easily complete [Parachutes for the Argent Crusade]
    By Mty in forum World of Warcraft Exploits
    Replies: 6
    Last Post: 11-22-2008, 11:28 PM
  3. quest not completing
    By dyerdown in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 10-21-2007, 12:15 PM
  4. Netherwing daily Quest get complete without doing anything.
    By kookoo in forum World of Warcraft Exploits
    Replies: 11
    Last Post: 08-23-2007, 07:13 PM
All times are GMT -5. The time now is 02:07 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