diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index e9f69d979..ce6dfc159 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -3654,15 +3654,15 @@ void ObjectMgr::LoadQuests() sLog.outErrorDb("Quest %u has `Method` = %u, expected values are 0, 1 or 2.",qinfo->GetQuestId(),qinfo->GetQuestMethod()); } - if (qinfo->SpecialFlags > QUEST_SPECIAL_FLAG_DB_ALLOWED) + if (qinfo->m_SpecialFlags > QUEST_SPECIAL_FLAG_DB_ALLOWED) { - sLog.outErrorDb("Quest %u has `SpecialFlags` = %u, above max flags not allowed for database.", qinfo->GetQuestId(), qinfo->SpecialFlags); + sLog.outErrorDb("Quest %u has `SpecialFlags` = %u, above max flags not allowed for database.", qinfo->GetQuestId(), qinfo->m_SpecialFlags); } if (qinfo->HasQuestFlag(QUEST_FLAGS_DAILY) && qinfo->HasQuestFlag(QUEST_FLAGS_WEEKLY)) { sLog.outErrorDb("Weekly Quest %u is marked as daily quest in `QuestFlags`, removed daily flag.",qinfo->GetQuestId()); - qinfo->QuestFlags &= ~QUEST_FLAGS_DAILY; + qinfo->m_QuestFlags &= ~QUEST_FLAGS_DAILY; } if (qinfo->HasQuestFlag(QUEST_FLAGS_DAILY)) @@ -3999,7 +3999,7 @@ void ObjectMgr::LoadQuests() { // In fact SpeakTo and Kill are quite same: either you can speak to mob:SpeakTo or you can't:Kill/Cast - qinfo->SetSpecialFlag(QUEST_SPECIAL_FLAG_KILL_OR_CAST | QUEST_SPECIAL_FLAG_SPEAKTO); + qinfo->SetSpecialFlag(QuestSpecialFlags(QUEST_SPECIAL_FLAG_KILL_OR_CAST | QUEST_SPECIAL_FLAG_SPEAKTO)); if (!qinfo->ReqCreatureOrGOCount[j]) { diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 40bcf3cc0..f399d6d56 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -13353,7 +13353,7 @@ bool Player::CanCompleteQuest(uint32 quest_id) const } } - if (qInfo->HasSpecialFlag(QUEST_SPECIAL_FLAG_KILL_OR_CAST | QUEST_SPECIAL_FLAG_SPEAKTO)) + if (qInfo->HasSpecialFlag(QuestSpecialFlags(QUEST_SPECIAL_FLAG_KILL_OR_CAST | QUEST_SPECIAL_FLAG_SPEAKTO))) { for(int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) { @@ -13507,7 +13507,7 @@ void Player::AddQuest( Quest const *pQuest, Object *questGiver ) questStatusData.m_itemcount[i] = 0; } - if (pQuest->HasSpecialFlag(QUEST_SPECIAL_FLAG_KILL_OR_CAST | QUEST_SPECIAL_FLAG_SPEAKTO)) + if (pQuest->HasSpecialFlag(QuestSpecialFlags(QUEST_SPECIAL_FLAG_KILL_OR_CAST | QUEST_SPECIAL_FLAG_SPEAKTO))) { for(int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) questStatusData.m_creatureOrGOcount[i] = 0; @@ -14593,7 +14593,7 @@ void Player::TalkedToCreature( uint32 entry, ObjectGuid guid ) if ( q_status.m_status == QUEST_STATUS_INCOMPLETE ) { - if (qInfo->HasSpecialFlag(QUEST_SPECIAL_FLAG_KILL_OR_CAST | QUEST_SPECIAL_FLAG_SPEAKTO)) + if (qInfo->HasSpecialFlag(QuestSpecialFlags(QUEST_SPECIAL_FLAG_KILL_OR_CAST | QUEST_SPECIAL_FLAG_SPEAKTO))) { for (int j = 0; j < QUEST_OBJECTIVES_COUNT; ++j) { diff --git a/src/game/QuestDef.cpp b/src/game/QuestDef.cpp index a28222dbb..03246eaf7 100644 --- a/src/game/QuestDef.cpp +++ b/src/game/QuestDef.cpp @@ -40,8 +40,8 @@ Quest::Quest(Field * questRecord) RequiredMaxRepValue = questRecord[15].GetInt32(); SuggestedPlayers = questRecord[16].GetUInt32(); LimitTime = questRecord[17].GetUInt32(); - QuestFlags = questRecord[18].GetUInt16(); - SpecialFlags = questRecord[19].GetUInt16(); + m_QuestFlags = questRecord[18].GetUInt16(); + m_SpecialFlags = questRecord[19].GetUInt16(); CharTitleId = questRecord[20].GetUInt32(); PlayersSlain = questRecord[21].GetUInt32(); BonusTalents = questRecord[22].GetUInt32(); @@ -137,8 +137,6 @@ Quest::Quest(Field * questRecord) QuestStartScript = questRecord[139].GetUInt32(); QuestCompleteScript = questRecord[140].GetUInt32(); - QuestFlags |= SpecialFlags << 24; - m_reqitemscount = 0; m_reqCreatureOrGOcount = 0; m_rewitemscount = 0; diff --git a/src/game/QuestDef.h b/src/game/QuestDef.h index da390ac4f..5bedb346c 100644 --- a/src/game/QuestDef.h +++ b/src/game/QuestDef.h @@ -200,10 +200,10 @@ class Quest Quest(Field * questRecord); uint32 XPValue( Player *pPlayer ) const; - uint32 GetQuestFlags() const { return QuestFlags; } - bool HasQuestFlag(uint32 flag) const { return (QuestFlags & flag) != 0; } - bool HasSpecialFlag(uint32 flag) const { return (SpecialFlags & flag) != 0; } - void SetSpecialFlag(uint32 flag) { SpecialFlags |= flag; } + uint32 GetQuestFlags() const { return m_QuestFlags; } + bool HasQuestFlag(QuestFlags flag) const { return (m_QuestFlags & flag) != 0; } + bool HasSpecialFlag(QuestSpecialFlags flag) const { return (m_SpecialFlags & flag) != 0; } + void SetSpecialFlag(QuestSpecialFlags flag) { m_SpecialFlags |= flag; } // table data accessors: uint32 GetQuestId() const { return QuestId; } @@ -260,13 +260,13 @@ class Quest uint32 GetQuestStartScript() const { return QuestStartScript; } uint32 GetQuestCompleteScript() const { return QuestCompleteScript; } - bool IsRepeatable() const { return SpecialFlags & QUEST_SPECIAL_FLAG_REPEATABLE; } + bool IsRepeatable() const { return m_SpecialFlags & QUEST_SPECIAL_FLAG_REPEATABLE; } bool IsAutoComplete() const { return QuestMethod ? false : true; } - bool IsDaily() const { return QuestFlags & QUEST_FLAGS_DAILY; } - bool IsWeekly() const { return QuestFlags & QUEST_FLAGS_WEEKLY; } - bool IsMonthly() const { return SpecialFlags & QUEST_SPECIAL_FLAG_MONTHLY; } - bool IsDailyOrWeekly() const { return QuestFlags & (QUEST_FLAGS_DAILY | QUEST_FLAGS_WEEKLY); } - bool IsAutoAccept() const { return QuestFlags & QUEST_FLAGS_AUTO_ACCEPT; } + bool IsDaily() const { return m_QuestFlags & QUEST_FLAGS_DAILY; } + bool IsWeekly() const { return m_QuestFlags & QUEST_FLAGS_WEEKLY; } + bool IsMonthly() const { return m_SpecialFlags & QUEST_SPECIAL_FLAG_MONTHLY; } + bool IsDailyOrWeekly() const { return m_QuestFlags & (QUEST_FLAGS_DAILY | QUEST_FLAGS_WEEKLY); } + bool IsAutoAccept() const { return m_QuestFlags & QUEST_FLAGS_AUTO_ACCEPT; } bool IsAllowedInRaid() const; // multiple values @@ -327,8 +327,8 @@ class Quest int32 RequiredMaxRepValue; uint32 SuggestedPlayers; uint32 LimitTime; - uint32 QuestFlags; - uint32 SpecialFlags; + uint32 m_QuestFlags; + uint32 m_SpecialFlags; uint32 CharTitleId; uint32 PlayersSlain; uint32 BonusTalents; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 2e206cc33..79e3101a0 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10657" + #define REVISION_NR "10658" #endif // __REVISION_NR_H__