Jump to content

[patch][6508] Implement Support For Questflags|1024

Guest NoFantasy

Recommended Posts

Implement QuestFlags 1024: Quests with QuestFlags|1024 should never end up in client quest log and they are expected to be automatically rewarded.

Revision: 6480+ (patch made for 6480)

Bug report: None found, but possibly exist

Who made it: NoFantasy

Info: Not many quests have this flag, however the few having this flag are causing issues. Normally a spell with effect16 is used to complete these quests. They all share the same thing, they are expected to work as flag quests, or a dummy quest if you like. Mostly used to "unlock" other quests or simply a check being used in instance attunements.

Example: Three different quests are possible to complete and give attunement to map 533 (old school raid instance). All three will reward player with spell 28006. This spell are expected to trigger spell 29294 (CompleteQuest(9378)). Quest 9378 has QuestFlags|1024. This quest has no real objectives, and from what we know only being used as a check to see if player has completed one of the three attunement quests required to enter instance.

We must make sure this quest will not end up in client quest log and we must also make sure this quest are automatically rewarded in database.


Index: src/game/Player.cpp
--- src/game/Player.cpp        (revision 6480)
+++ src/game/Player.cpp        (working copy)
@@ -11708,11 +11708,22 @@
                SetQuestStatus( quest_id, QUEST_STATUS_COMPLETE );

-                uint16 log_slot = FindQuestSlot( quest_id );
-                if( log_slot < MAX_QUEST_LOG_SIZE)
-                        SetQuestSlotState(log_slot,QUEST_STATE_COMPLETE);
+                Quest const* qInfo = objmgr.GetQuestTemplate(quest_id);
+                if( qInfo )
+                {
+                        if( qInfo->HasFlag(QUEST_FLAGS_AUTO_REWARDED) )
+                        {
+                                mQuestStatus[quest_id].m_rewarded = true;
+                        }
+                        else
+                        {
+                                uint16 log_slot = FindQuestSlot( quest_id );
+                                if( log_slot < MAX_QUEST_LOG_SIZE)
+                                        SetQuestSlotState(log_slot,QUEST_STATE_COMPLETE);

-                SendQuestComplete( quest_id );
+                                SendQuestComplete( quest_id );
+                        }
+                }

Index: src/game/QuestDef.h
--- src/game/QuestDef.h        (revision 6480)
+++ src/game/QuestDef.h        (working copy)
@@ -123,7 +123,7 @@
        QUEST_FLAGS_TBC                        = 128,                                             // Not used currently: Available if TBC expension enabled only
        QUEST_FLAGS_UNK2                     = 256,                                             // Not used currently: _DELIVER_MORE Quest needs more than normal _q-item_ drops from mobs
        QUEST_FLAGS_HIDDEN_REWARDS = 512,                                             // Items and money rewarded only sent in SMSG_QUESTGIVER_OFFER_REWARD (not in SMSG_QUESTGIVER_QUEST_DETAILS or in client quest log(SMSG_QUEST_QUERY_RESPONSE))
-        QUEST_FLAGS_UNK4                     = 1024,                                            // Not used currently: Unknown tbc flag
+        QUEST_FLAGS_AUTO_REWARDED    = 1024,                                            // These quests are automatically rewarded on quest complete and they will never appear in quest log client side.
        QUEST_FLAGS_TBC_RACES            = 2048,                                            // Not used currently: Bloodelf/draenei starting zone quests
        QUEST_FLAGS_DAILY                    = 4096,                                            // Used to know quest is Daily one

Link to comment
Share on other sites

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use