diff options
| author | Nay <dnpd.dd@gmail.com> | 2012-08-18 21:08:21 +0100 |
|---|---|---|
| committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-08-30 23:08:40 +0200 |
| commit | 7ecf4fdec147af7da51541aae9de4d91aff05ad6 (patch) | |
| tree | a345ce2b1221bdab34b4edcfff1819c005b97e79 /src/server/game/Entities | |
| parent | 081ee8f5d8ac9bf73c1b54a56f5fbda2fb365609 (diff) | |
Core/Quests: Split Flags and SpecialFlags
Diffstat (limited to 'src/server/game/Entities')
| -rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 9b381175280..b1ee724e5f7 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -14921,7 +14921,7 @@ bool Player::CanCompleteQuest(uint32 quest_id) if (q_status.Status == QUEST_STATUS_INCOMPLETE) { - if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_DELIVER)) + if (qInfo->HasSpecialFlag(QUEST_SPECIAL_FLAGS_DELIVER)) { for (uint8 i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; i++) { @@ -14930,7 +14930,7 @@ bool Player::CanCompleteQuest(uint32 quest_id) } } - if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_KILL | QUEST_TRINITY_FLAGS_CAST | QUEST_TRINITY_FLAGS_SPEAKTO)) + if (qInfo->HasSpecialFlag(QUEST_SPECIAL_FLAGS_KILL | QUEST_SPECIAL_FLAGS_CAST | QUEST_SPECIAL_FLAGS_SPEAKTO)) { for (uint8 i = 0; i < QUEST_OBJECTIVES_COUNT; i++) { @@ -14942,14 +14942,14 @@ bool Player::CanCompleteQuest(uint32 quest_id) } } - if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_PLAYER_KILL)) + if (qInfo->HasSpecialFlag(QUEST_SPECIAL_FLAGS_PLAYER_KILL)) if (qInfo->GetPlayersSlain() != 0 && q_status.PlayerCount < qInfo->GetPlayersSlain()) return false; - if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT) && !q_status.Explored) + if (qInfo->HasSpecialFlag(QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT) && !q_status.Explored) return false; - if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_TIMED) && q_status.Timer == 0) + if (qInfo->HasSpecialFlag(QUEST_SPECIAL_FLAGS_TIMED) && q_status.Timer == 0) return false; if (qInfo->GetRewOrReqMoney() < 0) @@ -14976,7 +14976,7 @@ bool Player::CanCompleteRepeatableQuest(Quest const* quest) if (!CanTakeQuest(quest, false)) return false; - if (quest->HasFlag(QUEST_TRINITY_FLAGS_DELIVER)) + if (quest->HasSpecialFlag(QUEST_SPECIAL_FLAGS_DELIVER)) for (uint8 i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; i++) if (quest->RequiredItemId[i] && quest->RequiredItemCount[i] && !HasItemCount(quest->RequiredItemId[i], quest->RequiredItemCount[i])) return false; @@ -15002,7 +15002,7 @@ bool Player::CanRewardQuest(Quest const* quest, bool msg) return false; // prevent receive reward with quest items in bank - if (quest->HasFlag(QUEST_TRINITY_FLAGS_DELIVER)) + if (quest->HasSpecialFlag(QUEST_SPECIAL_FLAGS_DELIVER)) { for (uint8 i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; i++) { @@ -15079,19 +15079,19 @@ void Player::AddQuest(Quest const* quest, Object* questGiver) questStatusData.Status = QUEST_STATUS_INCOMPLETE; questStatusData.Explored = false; - if (quest->HasFlag(QUEST_TRINITY_FLAGS_DELIVER)) + if (quest->HasSpecialFlag(QUEST_SPECIAL_FLAGS_DELIVER)) { for (uint8 i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i) questStatusData.ItemCount[i] = 0; } - if (quest->HasFlag(QUEST_TRINITY_FLAGS_KILL | QUEST_TRINITY_FLAGS_CAST | QUEST_TRINITY_FLAGS_SPEAKTO)) + if (quest->HasSpecialFlag(QUEST_SPECIAL_FLAGS_KILL | QUEST_SPECIAL_FLAGS_CAST | QUEST_SPECIAL_FLAGS_SPEAKTO)) { for (uint8 i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) questStatusData.CreatureOrGOCount[i] = 0; } - if (quest->HasFlag(QUEST_TRINITY_FLAGS_PLAYER_KILL)) + if (quest->HasSpecialFlag(QUEST_SPECIAL_FLAGS_PLAYER_KILL)) questStatusData.PlayerCount = 0; GiveQuestSourceItem(quest); @@ -15106,7 +15106,7 @@ void Player::AddQuest(Quest const* quest, Object* questGiver) GetReputationMgr().SetVisible(factionEntry); uint32 qtime = 0; - if (quest->HasFlag(QUEST_TRINITY_FLAGS_TIMED)) + if (quest->HasSpecialFlag(QUEST_SPECIAL_FLAGS_TIMED)) { uint32 limittime = quest->GetLimitTime(); @@ -15347,7 +15347,7 @@ void Player::FailQuest(uint32 questId) SetQuestSlotState(log_slot, QUEST_STATE_FAIL); } - if (quest->HasFlag(QUEST_TRINITY_FLAGS_TIMED)) + if (quest->HasSpecialFlag(QUEST_SPECIAL_FLAGS_TIMED)) { QuestStatusData& q_status = m_QuestStatus[questId]; @@ -15643,7 +15643,7 @@ bool Player::SatisfyQuestConditions(Quest const* qInfo, bool msg) bool Player::SatisfyQuestTimed(Quest const* qInfo, bool msg) { - if (!m_timedquests.empty() && qInfo->HasFlag(QUEST_TRINITY_FLAGS_TIMED)) + if (!m_timedquests.empty() && qInfo->HasSpecialFlag(QUEST_SPECIAL_FLAGS_TIMED)) { if (msg) { @@ -16003,7 +16003,7 @@ uint16 Player::GetReqKillOrCastCurrentCount(uint32 quest_id, int32 entry) void Player::AdjustQuestReqItemCount(Quest const* quest, QuestStatusData& questStatusData) { - if (quest->HasFlag(QUEST_TRINITY_FLAGS_DELIVER)) + if (quest->HasSpecialFlag(QUEST_SPECIAL_FLAGS_DELIVER)) { for (uint8 i = 0; i < QUEST_ITEM_OBJECTIVES_COUNT; ++i) { @@ -16144,7 +16144,7 @@ void Player::ItemAddedQuestCheck(uint32 entry, uint32 count) continue; Quest const* qInfo = sObjectMgr->GetQuestTemplate(questid); - if (!qInfo || !qInfo->HasFlag(QUEST_TRINITY_FLAGS_DELIVER)) + if (!qInfo || !qInfo->HasSpecialFlag(QUEST_SPECIAL_FLAGS_DELIVER)) continue; for (uint8 j = 0; j < QUEST_ITEM_OBJECTIVES_COUNT; ++j) @@ -16182,7 +16182,7 @@ void Player::ItemRemovedQuestCheck(uint32 entry, uint32 count) Quest const* qInfo = sObjectMgr->GetQuestTemplate(questid); if (!qInfo) continue; - if (!qInfo->HasFlag(QUEST_TRINITY_FLAGS_DELIVER)) + if (!qInfo->HasSpecialFlag(QUEST_SPECIAL_FLAGS_DELIVER)) continue; for (uint8 j = 0; j < QUEST_ITEM_OBJECTIVES_COUNT; ++j) @@ -16254,7 +16254,7 @@ void Player::KilledMonsterCredit(uint32 entry, uint64 guid /*= 0*/) QuestStatusData& q_status = m_QuestStatus[questid]; if (q_status.Status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->IsAllowedInRaid(GetMap()->GetDifficulty()))) { - if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_KILL) /*&& !qInfo->HasFlag(QUEST_TRINITY_FLAGS_CAST)*/) + if (qInfo->HasSpecialFlag(QUEST_SPECIAL_FLAGS_KILL) /*&& !qInfo->HasSpecialFlag(QUEST_SPECIAL_FLAGS_CAST)*/) { for (uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j) { @@ -16305,7 +16305,7 @@ void Player::KilledPlayerCredit() QuestStatusData& q_status = m_QuestStatus[questid]; if (q_status.Status == QUEST_STATUS_INCOMPLETE && (!GetGroup() || !GetGroup()->isRaidGroup() || qInfo->IsAllowedInRaid(GetMap()->GetDifficulty()))) { - if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_PLAYER_KILL)) + if (qInfo->HasSpecialFlag(QUEST_SPECIAL_FLAGS_PLAYER_KILL)) { uint32 reqkill = qInfo->GetPlayersSlain(); uint16 curkill = q_status.PlayerCount; @@ -16345,7 +16345,7 @@ void Player::KillCreditGO(uint32 entry, uint64 guid) if (q_status.Status == QUEST_STATUS_INCOMPLETE) { - if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_CAST) /*&& !qInfo->HasFlag(QUEST_TRINITY_FLAGS_KILL)*/) + if (qInfo->HasSpecialFlag(QUEST_SPECIAL_FLAGS_CAST) /*&& !qInfo->HasSpecialFlag(QUEST_SPECIAL_FLAGS_KILL)*/) { for (uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j) { @@ -16399,7 +16399,7 @@ void Player::TalkedToCreature(uint32 entry, uint64 guid) if (q_status.Status == QUEST_STATUS_INCOMPLETE) { - if (qInfo->HasFlag(QUEST_TRINITY_FLAGS_KILL | QUEST_TRINITY_FLAGS_CAST | QUEST_TRINITY_FLAGS_SPEAKTO)) + if (qInfo->HasSpecialFlag(QUEST_SPECIAL_FLAGS_KILL | QUEST_SPECIAL_FLAGS_CAST | QUEST_SPECIAL_FLAGS_SPEAKTO)) { for (uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j) { @@ -18188,7 +18188,7 @@ void Player::_LoadQuestStatus(PreparedQueryResult result) time_t quest_time = time_t(fields[3].GetUInt32()); - if (quest->HasFlag(QUEST_TRINITY_FLAGS_TIMED) && !GetQuestRewardStatus(quest_id)) + if (quest->HasSpecialFlag(QUEST_SPECIAL_FLAGS_TIMED) && !GetQuestRewardStatus(quest_id)) { AddTimedQuest(quest_id); |
