Quest Complete flag - 2.5.3.41812 [TBC classic] menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Dupheadss's Avatar Contributor CoreCoins Purchaser
    Reputation
    98
    Join Date
    Aug 2015
    Posts
    147
    Thanks G/R
    38/61
    Trade Feedback
    2 (100%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Quest Complete flag - 2.5.3.41812 [TBC classic]

    A mate and myself have been reversing the quest log for TBC classic and have mostly all the information we need however we can't seem to pinpoint the complete flag, Here are our findings thus far :

    Quest Log : [LocalPlayer+0xE9A0]+0x54]

    0x0=> Quest ID
    0x4 => Unk, always 0 so far
    0x8=> UShort[4] Objective counters
    with a 1/2 guid like value at the end of the entry
    Once quest is turned in, all other data disappears except that last value, which gets over-ridden the next quest you pick up (I suspect this to be a Unix timestamp)




    then at Game Base + 0x2B4C010 + 0x10
    I can find like cached quest data including names, description, levels etc etc, but see nothing that indicates "is complete" or tracks which character actually has it completed.

    Digging through some older posts / projects I see they use the 0x4 as a complete flag but that value never updates regardless of the state of the quest.

    Any insight would be great !
    Attached Thumbnails Attached Thumbnails Quest Complete flag - 2.5.3.41812 [TBC classic]-unknown-png  

    Quest Complete flag - 2.5.3.41812 [TBC classic]
  2. Thanks ChrisIsMe (1 members gave Thanks to Dupheadss for this useful post)
  3. #2
    ChrisIsMe's Avatar Contributor
    Reputation
    164
    Join Date
    Apr 2017
    Posts
    210
    Thanks G/R
    67/100
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    aaaaaaaaaaaaaaaaaaaa
    Last edited by ChrisIsMe; 11-01-2023 at 05:05 PM.

  4. Thanks maikel233, Sacred (2 members gave Thanks to ChrisIsMe for this useful post)
  5. #3
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1511
    Join Date
    May 2008
    Posts
    2,432
    Thanks G/R
    81/333
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Isn't it just the CGPlayerData::questLog[20] descriptor you're looking for?

    Code:
    [StructLayout(LayoutKind.Sequential, Pack = 1)]
    public unsafe struct QuestLogInfo {
        /* 0x00 */ public int QuestId;
        /* 0x04 */ public int StateFlags;
        /* 0x08 */ public int EndTime;
        /* 0x0C */ public int AcceptTime;
        /* 0x10 */ public fixed short ObjectiveProgress[24];
    }

  6. Thanks Dupheadss (1 members gave Thanks to Jadd for this useful post)
  7. #4
    Dupheadss's Avatar Contributor CoreCoins Purchaser
    Reputation
    98
    Join Date
    Aug 2015
    Posts
    147
    Thanks G/R
    38/61
    Trade Feedback
    2 (100%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the struct pretty sure that's where I am at.

    my issue is just with 0x04 StateFlags it seems to never update, Unless the completed flag isn't stored there?

  8. #5
    Razzue's Avatar Contributor Avid Ailurophile

    CoreCoins Purchaser Authenticator enabled
    Reputation
    378
    Join Date
    Jun 2017
    Posts
    588
    Thanks G/R
    184/267
    Trade Feedback
    2 (100%)
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Sorry to hijack the thread, but I am also curious on this.
    So far I can read the quest log, quest tracker and some static quest data, but I'm struggling to get any kind of completed/completable flag.

    For the quest log (Base + 0x3172D00 + 0xC) i was reading structs like this in a 25 i * 12 loop, but noticed on my one character there's a couple quests with a couple extra values.. I'm assuming this isn't really "necessary" outside of getting quest log index?*Reference Unknown
    Code:
    [StructLayout(LayoutKind.Explicit)]
    internal struct QuestLogEntry
    {
        [FieldOffset(0x0)] 
        internal uint QuestID;
    
        [FieldOffset(0x4)]
        internal uint Index;
    
        [FieldOffset(0x8)] 
        internal uint Flags; // Is always 36?
    }
    
    Then reading the data from PlayerBase + x10 + x3BC i seem to run into the same problem as our friend above.
    Only fields that update are 0x0 for the Quest ID, then 0x8 as an array of uShorts as objective stracking.
    *Reference Unknown2

    And for bonus points.. if anyone can nudge me in the right direction for the data structure for: Base + 0x2B4C020 i would be ever thankful.
    The hot mess i'm currently playing with that at least gets some neat info, but feels so incomplete
    Code:
    [StructLayout(LayoutKind.Sequential)]internal struct QDE
    {
        internal IntPtr Next;
        internal uint QuestID1;
        internal uint Unk_1;
        internal uint QuestID2;
        internal uint Unk_2;
        internal uint QuestLevel;
        internal uint Unk_3;
        internal uint Unk_4;
        internal uint Unk_5;
        internal uint ReqLevel;
        internal uint Unk_6;
        internal uint Unk_7;
        internal uint Unk_8;
        internal uint NextQuest;
        internal uint Unk_9;
        internal uint Timestamp1;
        internal uint RewardMoney;
        internal uint RewardItems;
        internal uint Timestamp2;
        internal uint Unk_10;
        internal uint Unk_11;
        internal uint Unk_12;
        internal uint Unk_13;
        internal uint Unk_14;
        internal uint Timestamp3;
        internal uint Unk_15;
        internal uint Unk_16;
        internal uint Unk_17;
        internal uint Unk_18;
        internal uint Unk_19;
        internal uint Unk_20;
        internal uint Unk_21;
        internal uint Unk_22;
        internal uint Unk_23;
    }
    
    internal class QuestDataEntry
    {
        internal IntPtr Base;
        internal QuestDataEntry(IntPtr _Base) => Base = _Base;
        internal QDE Info => Memory.Read<QDE>(Base);
        internal string Name => Memory.ReadUtfString(Base + 0x8C, 512);
        internal string Description => Memory.ReadUtfString(Base + 0x28C, 512);
        internal string CompleteText => Memory.ReadUtfString(Base + 0xE44, 512);
    
    }
    Any nudge in the right direction would be greatly appreciated (my dump errors out on Script_GetQuestsCompleted and has a rediculous amount of jumpouts on quest completed by ID check). My DM's are always open <3
    Attached Thumbnails Attached Thumbnails Quest Complete flag - 2.5.3.41812 [TBC classic]-unknown-png   Quest Complete flag - 2.5.3.41812 [TBC classic]-unknown2-png  
    Last edited by Razzue; 01-25-2022 at 02:46 PM.

  9. #6
    ChrisIsMe's Avatar Contributor
    Reputation
    164
    Join Date
    Apr 2017
    Posts
    210
    Thanks G/R
    67/100
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    aaaaaaaaaaaaaaaaaaaa
    Last edited by ChrisIsMe; 11-01-2023 at 05:05 PM.

  10. #7
    Razzue's Avatar Contributor Avid Ailurophile

    CoreCoins Purchaser Authenticator enabled
    Reputation
    378
    Join Date
    Jun 2017
    Posts
    588
    Thanks G/R
    184/267
    Trade Feedback
    2 (100%)
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Either I'm reading from the wrong place (LP +x10+x3BC), or that's not how it operates in classics 😅 like the Quest ID, objectives, and start time seem to match up, but no matter what, there is never a flag after the quest ID that says it's ready to hand in 🤔

    On top of that it seems all this data just disappears when the quest is actually turned in, so getting quests that have already been completed seems moot 🤷*♂️ at this point I'm tempted to just make an addon that creates an array of frames named with completed quest ID's xD

  11. #8
    ChrisIsMe's Avatar Contributor
    Reputation
    164
    Join Date
    Apr 2017
    Posts
    210
    Thanks G/R
    67/100
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    aaaaaaaaaaaaaaaaaaaa
    Last edited by ChrisIsMe; 11-01-2023 at 05:05 PM.

  12. #9
    Narache's Avatar Member
    Reputation
    13
    Join Date
    Dec 2007
    Posts
    36
    Thanks G/R
    6/7
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Never spent time reversing the quest infos (yet!) but according to my Field dumper, questlog is 1600bits of size, so your CGPlayerQuestLogEntry looks a bit missing

    CGPlayerData_QuestLog = 0x3bc, // size 1600bits
    Last edited by Narache; 01-26-2022 at 03:43 PM.

  13. #10
    InnerSilence's Avatar Active Member
    Reputation
    29
    Join Date
    Oct 2019
    Posts
    81
    Thanks G/R
    13/16
    Trade Feedback
    0 (0%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Well while there might be a flag for failed quests, there is no completed/completable flag. Determining if quest is completed is not a trivial task. For the QuestCacheEntry struct I would refer you to here (Accessing WDB cache files (QuestCache.wdb)) and here.
    Also I commented some script methods in the client version 2.5.3.41812 so you can see how the game is determining if a quest is complete. Also included some useful structs for your reference:

    Code:
    __int64 __usercall Script_IsQuestComplete@<rax>(__int64 a1@<rcx>, float a2@<xmm0>)
    {
      __int64 v2; // r14
      __int64 result; // rax
      int questID; // eax
      int completed; // esi
      unsigned int questEntryIndexInQuestLog; // edi
      unsigned int pQuestID; // ebx
      int *questLogEntryPtr; // rcx
      __int64 activePlayerPtr; // rax
      __int64 startOfQuestLogEntry; // rbx
      __int64 m_activePlayerPtr; // rax
      __int64 questIndex; // rcx
      __int64 questInfoPtr; // rbp
      int *questIdFromLogEntry; // rbx
      __int64 questGiverId; // rax
      __int64 questCacheEntryResult; // rax
      __int64 questCacheEntry; // rbx
      char v18; // [rsp+30h] [rbp-28h]
    
      v2 = a1;
      if ( (unsigned int)lua_isnumber(a1, 1i64) )
      {
        questID = lua_tointeger(v2, 1i64);
        completed = 0;
        questEntryIndexInQuestLog = 0;
        pQuestID = questID;
        questLogEntryPtr = CGQuestLog::m_logEntries;
        while ( questLogEntryPtr[2] & 1 || *questLogEntryPtr != questID )
        {
          ++questEntryIndexInQuestLog;
          questLogEntryPtr += 3;
          if ( questEntryIndexInQuestLog >= 0x32 )
          {
            questEntryIndexInQuestLog = -1;
            break;
          }
        }
        ClntObjMgrGetActivePlayer(questID, (__int64)questLogEntryPtr);
        if ( (unsigned int)CGQuestLog::IsQuestReadyForTurnin(activePlayerPtr, pQuestID, 1, 0, a2, 0) )
          goto LABEL_26;
        if ( questEntryIndexInQuestLog < CGQuestLog::m_numQuests )
        {
          startOfQuestLogEntry = 3i64 * questEntryIndexInQuestLog;
          if ( !(CGQuestLog::m_logEntries[startOfQuestLogEntry + 2] & 1) )
          {
            ClntObjMgrGetActivePlayer(questEntryIndexInQuestLog, 3i64 * questEntryIndexInQuestLog);
            if ( m_activePlayerPtr )
            {
              questIndex = CGQuestLog::m_logEntries[startOfQuestLogEntry + 1];
              if ( (int)questIndex < 0 || (unsigned int)questIndex > 0x19 )
                questInfoPtr = 0i64;
              else
                questInfoPtr = (questIndex << 6) + *(_QWORD *)(m_activePlayerPtr + 0xE9A0) + 0x54i64;
              questIdFromLogEntry = &CGQuestLog::m_logEntries[startOfQuestLogEntry];
              questGiverId = CGQuestInfo::GetRecentQuestGiverFor((__int64)&v18, *questIdFromLogEntry);
              questCacheEntryResult = DBCache::GetRecord(
                                        (__int64)&QuestsCacheBase,
                                        questIdFromLogEntry,
                                        questGiverId,
                                        (void (__fastcall *)(_QWORD, _QWORD, _QWORD, _QWORD))QuestQueryCallback,
                                        0i64);
              questCacheEntry = questCacheEntryResult;
              if ( questCacheEntryResult )
              {
                if ( questInfoPtr
                  && !(*(_BYTE *)(questCacheEntryResult + 0x60) & 6)
                  && !(*(_BYTE *)(questInfoPtr + 4) & 2)
                  && !QuestLogEntryHasFailed(questEntryIndexInQuestLog)
                  && *(_QWORD *)(questCacheEntry + 0x2E28) <= 0ui64 )
                {
    LABEL_26:
                  completed = 1;
                }
              }
            }
          }
        }
        lua_pushboolean(v2, completed);
        result = 1i64;
      }
      else
      {
        sub_58EE40(v2, (__int64)aUsageIsquestco);
        result = 0i64;
      }
      return result;
    }
    
    
    __int64 __usercall CGQuestLog::IsQuestReadyForTurnin@<rax>(__int64 activePlayerPtr@<rcx>, __int64 questIdParam@<rdx>, char a3@<r8b>, int a4@<r9d>, float xmm0_4_0@<xmm0>, int a5)
    {
      int zeroInt; // er14
      char aBoolean; // di
      __int64 m_activePlayerPtr; // r15
      __int64 v9; // rax
      unsigned int v10; // ebx
      __int64 questCacheEntryPtr; // rsi
      unsigned int v12; // eax
      __int64 playerQuestInfoPtr; // rdx
      int *v15; // rax
      char v16; // al
      __int64 objectiveCount; // rax
      __int64 QuestObjectivesStartPtr; // rbx
      __int64 QuestObjectivesEndPtr; // rbp
      int v20; // edi
      __int64 QuestObjectiveTypePtr; // rbx
      char v22; // [rsp+30h] [rbp-28h]
      int localQuestId; // [rsp+68h] [rbp+10h]
    
      localQuestId = questIdParam;
      zeroInt = a4;                                 // is zero
      aBoolean = a3;                                // is 1
      m_activePlayerPtr = activePlayerPtr;
      if ( !activePlayerPtr )
        return 0i64;
      v9 = CGQuestInfo::GetRecentQuestGiverFor((__int64)&v22, questIdParam);
      v10 = 0;
      questCacheEntryPtr = DBCache::GetRecord(
                             (__int64)&QuestsCacheBase,
                             &localQuestId,
                             v9,
                             (void (__fastcall *)(_QWORD, _QWORD, _QWORD, _QWORD))QuestQueryCallback,
                             0i64);
      if ( !questCacheEntryPtr )
        return 0i64;
      if ( localQuestId )
      {
        v12 = 0;
        playerQuestInfoPtr = *(_QWORD *)(m_activePlayerPtr + 0xE9A0) + 0x54i64;
        while ( *(_DWORD *)playerQuestInfoPtr != localQuestId )
        {
          ++v12;
          playerQuestInfoPtr += 64i64;
          if ( v12 >= 0x19 )
            goto LABEL_7;
        }
      }
      else
      {
    LABEL_7:
        playerQuestInfoPtr = 0i64;
      }
      if ( (*(_DWORD *)(questCacheEntryPtr + 4) - 3) & 0xFFFFFFFD )
      {
        if ( !playerQuestInfoPtr )
          return 0i64;
      }
      else if ( !playerQuestInfoPtr )
      {
        goto LABEL_14;
      }
      if ( *(_BYTE *)(playerQuestInfoPtr + 4) & 2 )
        return 0i64;
    LABEL_14:
      if ( CGQuestLog::m_numQuests )
      {
        v15 = CGQuestLog::m_logEntries;
        while ( *v15 != localQuestId )
        {
          ++v10;
          v15 += 3;
          if ( v10 >= CGQuestLog::m_numQuests )
            goto LABEL_21;
        }
        v16 = CGQuestLog::m_logEntries[3 * v10 + 2];
        if ( !(v16 & 1) )
        {
          if ( v16 & 2 )
            return 0i64;
        }
      }
    LABEL_21:
      if ( aBoolean && !*(_QWORD *)(questCacheEntryPtr + 0x2E28) && !(*(_BYTE *)(questCacheEntryPtr + 0x60) & 2)
        || *(_BYTE *)(questCacheEntryPtr + 0x60) & 2 && playerQuestInfoPtr && !(*(_BYTE *)(playerQuestInfoPtr + 4) & 1) )
      {
        return 0i64;
      }
      objectiveCount = *(_QWORD *)(questCacheEntryPtr + 0x2E28);
      if ( objectiveCount )
      {
        QuestObjectivesStartPtr = *(_QWORD *)(questCacheEntryPtr + 0x2E20);
        QuestObjectivesEndPtr = QuestObjectivesStartPtr + 312 * objectiveCount;
        if ( QuestObjectivesStartPtr != QuestObjectivesEndPtr )
        {
          v20 = a5;
          QuestObjectiveTypePtr = QuestObjectivesStartPtr + 4;
          do
          {
            if ( QuestObjectiveTypePtr != 4 && !(*(_BYTE *)(QuestObjectiveTypePtr + 0xC) & 4) )
            {
              if ( *(_BYTE *)QuestObjectiveTypePtr == 1
                && zeroInt
                && v20
                && *(_DWORD *)(QuestObjectiveTypePtr + 4) == zeroInt )
              {
                if ( v20 < *(_DWORD *)(QuestObjectiveTypePtr + 8) )
                  return 0i64;
              }
              else if ( !CGQuestLog::IsQuestObjectiveComplete(
                           m_activePlayerPtr,
                           (__int64 *)questCacheEntryPtr,
                           QuestObjectiveTypePtr - 4,
                           xmm0_4_0) )
              {
                return 0i64;
              }
            }
            QuestObjectiveTypePtr += 312i64;        // size of quest objective struct
          }
          while ( QuestObjectiveTypePtr - 4 != QuestObjectivesEndPtr );
        }
      }
      sub_163BE00(0x21u);
      return 1i64;
    }
    
    char __usercall CGQuestLog::IsQuestObjectiveComplete@<al>(__int64 aPlayerPtr@<rcx>, __int64 *aQuestCahceEntryPtr@<rdx>, __int64 aObjectiveInfoPtr@<r8>, float a4@<xmm0>)
    {
      int objectiveType; // eax
      __int64 v5; // r9
      char result; // al
      unsigned int questID; // ecx
      unsigned int v8; // eax
      _DWORD *questInfoPtr; // rdx
    
      objectiveType = *(unsigned __int8 *)(aObjectiveInfoPtr + 4);
      v5 = aPlayerPtr;
      switch ( objectiveType )
      {
        case 0:
        case 1:
        case 2:
        case 3:
        case 9:
        case 13:
        case 16:
        case 17:
        case 18:
          result = (int)GetQuestObjectiveFulfilledCount(
                          objectiveType,
                          *(_DWORD *)aQuestCahceEntryPtr,
                          aPlayerPtr,
                          aObjectiveInfoPtr) >= *(_DWORD *)(aObjectiveInfoPtr + 12);
          break;
        case 4:
          result = PlayerHasEnoughCurrency(*(_DWORD *)(aObjectiveInfoPtr + 8), *(_DWORD *)(aObjectiveInfoPtr + 12));
          break;
        case 5:
          result = PlayerLearnedSpell(aPlayerPtr, *(_DWORD *)(aObjectiveInfoPtr + 8));
          break;
        case 6:
          result = (int)PlayerFactionReputation(*(_DWORD *)(aObjectiveInfoPtr + 8)) >= *(_DWORD *)(aObjectiveInfoPtr + 12);
          break;
        case 7:
          result = (int)PlayerFactionReputation(*(_DWORD *)(aObjectiveInfoPtr + 8)) <= *(_DWORD *)(aObjectiveInfoPtr + 12);
          break;
        case 8:
          if ( !((*(unsigned int *)((char *)&ObjectTypeFlags[*(unsigned __int8 *)(aPlayerPtr + 0x20)] + aPlayerPtr) >> 5) & 1) )
            goto LABEL_13;
          result = *(_QWORD *)(*(_QWORD *)(aPlayerPtr + 0x11EB8) + 0x870i64) >= (unsigned __int64)*(int *)(aObjectiveInfoPtr + 12);// only for local player
          break;
        case 10:
        case 11:
        case 12:
        case 14:
        case 19:
        case 20:
          questID = *(_DWORD *)aQuestCahceEntryPtr;
          if ( *(_DWORD *)aQuestCahceEntryPtr )
          {
            v8 = 0;
            questInfoPtr = (_DWORD *)(*(_QWORD *)(v5 + 0xE9A0) + 0x54i64);
            while ( *questInfoPtr != questID )
            {
              ++v8;
              questInfoPtr += 16;
              if ( v8 >= 0x19 )
                goto LABEL_13;
            }
            result = ((256 << *(_BYTE *)(aObjectiveInfoPtr + 5)) & questInfoPtr[1]) != 0;
          }
          else
          {
    LABEL_13:
            result = 0;
          }
          break;
        case 15:                                    // quest type: Progress Bar
          sub_177DA40(aPlayerPtr, *(_DWORD *)aQuestCahceEntryPtr, aObjectiveInfoPtr, aPlayerPtr);
          result = a4 >= *((float *)&xmmword_259A858 + 1);
          break;
        default:
          result = 1;
          break;
      }
      return result;
    }
    
        public enum QuestType
        {
            AutoComplete,
            Disabled,
            Enabled,
            WorldQuest
        }
        [Flags]
        public enum QuestFlags
        {
            None,
            /// <summary>
            /// If player dies, the quest fails
            /// </summary>
            StayAlive = 1,
            /// <summary>
            /// Escort quests or any other event-driven quests.
            /// </summary>
            Escort = 2,
            /// <summary>
            /// Involves the activation of an areatrigger
            /// </summary>
            Exploration = 4,
            /// <summary>
            /// Allows the quest to be shared with pther players.
            /// </summary>
            Sharable = 8,
            /// <summary>
            /// Either unknown or unused
            /// </summary>
            Unused = 16,
            /// <summary>
            /// Epic class quests?
            /// </summary>
            Epic = 32,
            /// <summary>
            /// Raid quests
            /// </summary>
            Raid = 64,
            /// <summary>
            /// TBC quests
            /// </summary>
            TBC = 128,
        }
        [StructLayout(LayoutKind.Sequential, Pack = 1)]
        internal struct QuestObjectiveInfo
        {
            //size is 312 bytes
            public int ID;
            public QuestObjectiveType Type; //0x4
            public byte ObjectiveIndex; //0x5, it is the objective index in the quest info
            public short OrderIndex;//0x6, not sure about this
            public uint ObjectId;//0x8
            public uint Amount;//0xc
            public QuestObjectiveFlags Flags;//0x10
            public uint Flags2;//0x14, not sure about this
            public float PercentAmount;//0x18, related to ProgressBar objectives
        }
        [Flags]
        internal enum QuestObjectiveFlags : uint
        {
            None,
            /// <summary>
            /// Client displays large yellow blob on minimap for creature/gameobject
            /// </summary>
            TrackedOnMinimap = 1,
            /// <summary>
            /// Client will not see the objective displayed until all previous objectives are completed
            /// </summary>
            Sequenced = 2,
            /// <summary>
            /// Not required to complete the quest
            /// </summary>
            Optional = 4,
            /// <summary>
            /// Never displayed in quest log
            /// </summary>
            Hidden = 8,
            /// <summary>
            /// Skip showing item objective progress
            /// </summary>
            HideItemGains = 16,
            /// <summary>
            /// Item objective progress counts items in inventory instead of reading it from updatefields
            /// </summary>
            ProgressCountsItemInInventory = 32,
            /// <summary>
            /// Hidden objective used to calculate progress bar percent (quests are limited to a single progress bar objective)
            /// </summary>
            PartOfProgressBar = 64,
        }
        internal enum QuestObjectiveType : byte
        {
            Kill,
            Collect,
            InteractWithObject,
            InteractWithUnit,
            Currency,
            LearnSpell,
            MinReputtionWithFaction,
            MaxReputtionWithFaction,
            Money,
            PlayerKills,
            AreaTrigger,
            DefeatBattlePetNPC,
            DefeatBattlePet,
            WinPvPBattle,
            CriteriaTree,
            ProgressBar,
            HaveCurrency,
            ObtainCurrency,
            Type18,
            Type19,
            Type20,
        }
    
            [StructLayout(LayoutKind.Sequential, Pack = 1)]
        public struct QuestInfo
        {
            /* 0x00 */
            public uint QuestId;
            /* 0x04 */
            public QuestState StateFlags;
            /* 0x08 */
            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 24)]
            public short[] ObjectiveProgress;
    
            public int EndTime;
            /* 0x0C */
            public int AcceptTime;
            /* 0x10 */
        }
        public enum QuestState : uint
        {
            None = 0,
            Complete = 1,
            Failed = 2
        }
        [StructLayout(LayoutKind.Sequential, Pack = 2)]
        internal struct QuestLogEntry
        {
            public uint QuestID;
    
            public uint QuestInfoIndex;
    
            public QuestLogEntryFlags Flags; 
        }
        [Flags]
        public enum QuestLogEntryFlags : uint
        {
            NONE = 0,
            Header = 1,
            Failed = 2,
            InProgress = 4,//not sure
            Unk8 = 8,
            Unk16 = 16,
            Unk32 = 32,
        }
    Last edited by InnerSilence; 03-08-2022 at 04:46 AM.

  14. Thanks Razzue, Dupheadss, oiramario (3 members gave Thanks to InnerSilence for this useful post)
  15. #11
    oiramario's Avatar Established Member
    Reputation
    85
    Join Date
    Mar 2021
    Posts
    133
    Thanks G/R
    36/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @InnerSilence
    How to restore the code like you sent above in IDA?
    thx.

  16. #12
    InnerSilence's Avatar Active Member
    Reputation
    29
    Join Date
    Oct 2019
    Posts
    81
    Thanks G/R
    13/16
    Trade Feedback
    0 (0%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by oiramario View Post
    @InnerSilence
    How to restore the code like you sent above in IDA?
    thx.
    I would suggest load the same client file in IDA and find the scripts I posted above then compare and rename the stuff in your IDA. The offsets for Scripts are mentioned here

  17. #13
    oiramario's Avatar Established Member
    Reputation
    85
    Join Date
    Mar 2021
    Posts
    133
    Thanks G/R
    36/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @InnerSilence
    I have been able to export Lua functions with some related offsets, as you can see here:
    https://www.ownedcore.com/forums/wor...3-42598-a.html

    Code:
      int questID; // eax
      int completed; // esi
      unsigned int questEntryIndexInQuestLog; // edi
      unsigned int pQuestID; // ebx
      int *questLogEntryPtr; // rcx
      __int64 activePlayerPtr; // rax
      __int64 startOfQuestLogEntry; // rbx
      __int64 m_activePlayerPtr; // rax
      __int64 questIndex; // rcx
      __int64 questInfoPtr; // rbp
      int *questIdFromLogEntry; // rbx
      __int64 questGiverId; // rax
      __int64 questCacheEntryResult; // rax
      __int64 questCacheEntry; // rbx
      char v18; // [rsp+30h] [rbp-28h]
    
      v2 = a1;
      if ( (unsigned int)lua_isnumber(a1, 1i64) )
      {
        questID = lua_tointeger(v2, 1i64);
        completed = 0;
        questEntryIndexInQuestLog = 0;
        pQuestID = questID;
        questLogEntryPtr = CGQuestLog::m_logEntries;
        while ( questLogEntryPtr[2] & 1 || *questLogEntryPtr != questID )
        {
          ++questEntryIndexInQuestLog;
          questLogEntryPtr += 3;
          if ( questEntryIndexInQuestLog >= 0x32 )
          {
            questEntryIndexInQuestLog = -1;
            break;
          }
        }
    But all I can do is the function name. How to do like you, even the variable name has been modified.

  18. #14
    InnerSilence's Avatar Active Member
    Reputation
    29
    Join Date
    Oct 2019
    Posts
    81
    Thanks G/R
    13/16
    Trade Feedback
    0 (0%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by oiramario View Post
    @InnerSilence
    I have been able to export Lua functions with some related offsets, as you can see here:
    https://www.ownedcore.com/forums/wor...3-42598-a.html

    But all I can do is the function name. How to do like you, even the variable name has been modified.
    Just click on variable and press n in IDA and rename it to whatever you want.

  19. #15
    Razzue's Avatar Contributor Avid Ailurophile

    CoreCoins Purchaser Authenticator enabled
    Reputation
    378
    Join Date
    Jun 2017
    Posts
    588
    Thanks G/R
    184/267
    Trade Feedback
    2 (100%)
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by InnerSilence View Post
    I would suggest load the same client file in IDA and find the scripts I posted above then compare and rename the stuff in your IDA. The offsets for Scripts are mentioned here ([TBC Classic] [2.5.3.41812])
    That's essentially what I attempted doing.. and maybe got ~ 1/3 to 1/2 of the way you did!
    Still a tad confused by it all, but I'll definitely take a peek and try to hack away at what you kindly shared <3

Page 1 of 2 12 LastLast

Similar Threads

  1. [Repack] Smart Ass Child's Complete Combo Repacks (v1.0) (PreTBC/TBC)
    By othman in forum WoW EMU General Releases
    Replies: 5
    Last Post: 07-28-2013, 03:17 PM
  2. Quest Complete gold
    By KasSmIR in forum Diablo 3 Memory Editing
    Replies: 5
    Last Post: 04-25-2013, 08:04 AM
  3. Twilight Highlands Extra Skinning/Easy Quest Completion
    By outkast82889 in forum World of Warcraft Exploits
    Replies: 0
    Last Post: 12-09-2010, 01:20 PM
  4. quest db flag issues
    By xxfrozen in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 02-20-2009, 11:02 AM
  5. [Bug] Kill X mobs quest completion
    By nooblet23 in forum Age of Conan Exploits|Hacks
    Replies: 1
    Last Post: 06-11-2008, 03:45 PM
All times are GMT -5. The time now is 06:38 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