aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2009-06-17 21:48:19 -0500
committermegamage <none@none>2009-06-17 21:48:19 -0500
commitbff6fbcf54361dd67a897a59a335cdd037e030dd (patch)
tree1bf4cff97e1798a5aeaa35d141ca36cab0153a03
parent3fab9ff35e1d8a80872223e05655d04d7f56945c (diff)
*A temp fix for the bug that weekly quests can be repeated without any limit.
--HG-- branch : trunk
-rw-r--r--src/game/ObjectMgr.cpp2
-rw-r--r--src/game/QuestDef.h3
-rw-r--r--src/game/QuestHandler.cpp2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index 31c0723869d..c088bc66c9f 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -3465,7 +3465,7 @@ void ObjectMgr::LoadQuests()
qinfo->QuestFlags &= QUEST_TRINITY_FLAGS_DB_ALLOWED;
}
- if(qinfo->QuestFlags & QUEST_FLAGS_DAILY)
+ if(qinfo->QuestFlags & (QUEST_FLAGS_DAILY | QUEST_FLAGS_WEEKLY))
{
if(!(qinfo->QuestFlags & QUEST_TRINITY_FLAGS_REPEATABLE))
{
diff --git a/src/game/QuestDef.h b/src/game/QuestDef.h
index 4db92b941ba..c3285ec816c 100644
--- a/src/game/QuestDef.h
+++ b/src/game/QuestDef.h
@@ -133,6 +133,7 @@ enum __QuestFlags
QUEST_FLAGS_AUTO_REWARDED = 0x00000400, // These quests are automatically rewarded on quest complete and they will never appear in quest log client side.
QUEST_FLAGS_TBC_RACES = 0x00000800, // Not used currently: Blood elf/Draenei starting zone quests
QUEST_FLAGS_DAILY = 0x00001000, // Used to know quest is Daily one
+ QUEST_FLAGS_WEEKLY = 0x00008000,
// Trinity flags for set SpecialFlags in DB if required but used only at server
QUEST_TRINITY_FLAGS_REPEATABLE = 0x010000, // Set by 1 in SpecialFlags from DB
@@ -225,7 +226,7 @@ class Quest
bool IsRepeatable() const { return QuestFlags & QUEST_TRINITY_FLAGS_REPEATABLE; }
bool IsAutoComplete() const { return QuestMethod ? false : true; }
uint32 GetFlags() const { return QuestFlags; }
- bool IsDaily() const { return QuestFlags & QUEST_FLAGS_DAILY; }
+ bool IsDaily() const { return QuestFlags & (QUEST_FLAGS_DAILY | QUEST_FLAGS_WEEKLY); }
// multiple values
std::string ObjectiveText[QUEST_OBJECTIVES_COUNT];
diff --git a/src/game/QuestHandler.cpp b/src/game/QuestHandler.cpp
index 1efbc859198..b2478860c61 100644
--- a/src/game/QuestHandler.cpp
+++ b/src/game/QuestHandler.cpp
@@ -591,7 +591,7 @@ uint32 WorldSession::getDialogStatus(Player *pPlayer, Object* questgiver, uint32
result2 = DIALOG_STATUS_REWARD_REP;
else if (pPlayer->getLevel() <= pPlayer->GetQuestLevel(pQuest) + sWorld.getConfig(CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF) )
{
- if (pQuest->HasFlag(QUEST_FLAGS_DAILY))
+ if (pQuest->IsDaily())
result2 = DIALOG_STATUS_AVAILABLE_REP;
else
result2 = DIALOG_STATUS_AVAILABLE;