diff options
author | Shauren <shauren.trinity@gmail.com> | 2019-11-13 13:32:55 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2019-11-13 13:32:55 +0100 |
commit | fd4e368054c8876ab02b49b9af66c0fe473fa1ae (patch) | |
tree | 3f757f07c3be116ab7735d7f9114800204e48c93 /src | |
parent | 6aee80e61afbf14f2f85f67e1fa1b4e0a0f73741 (diff) |
Core/Misc: Mark some quest functions const
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 8 | ||||
-rw-r--r-- | src/server/game/Entities/Player/Player.h | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 644fe75758f..1764de1c30c 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -14930,7 +14930,7 @@ bool Player::CanCompleteRepeatableQuest(Quest const* quest) return true; } -bool Player::CanRewardQuest(Quest const* quest, bool msg) +bool Player::CanRewardQuest(Quest const* quest, bool msg) const { // not auto complete quest and not completed quest (only cheating case, then ignore without message) if (!quest->IsDFQuest() && !quest->IsAutoComplete() && GetQuestStatus(quest->GetQuestId()) != QUEST_STATUS_COMPLETE) @@ -15032,7 +15032,7 @@ void Player::AddQuestAndCheckCompletion(Quest const* quest, Object* questGiver) } } -bool Player::CanRewardQuest(Quest const* quest, uint32 reward, bool msg) +bool Player::CanRewardQuest(Quest const* quest, uint32 reward, bool msg) const { // prevent receive reward with quest items in bank or for not completed quest if (!CanRewardQuest(quest, msg)) @@ -16059,7 +16059,7 @@ bool Player::SatisfyQuestDay(Quest const* qInfo, bool /*msg*/) const return m_activePlayerData->DailyQuestsCompleted.FindIndex(qInfo->GetQuestId()) == -1; } -bool Player::SatisfyQuestWeek(Quest const* qInfo, bool /*msg*/) +bool Player::SatisfyQuestWeek(Quest const* qInfo, bool /*msg*/) const { if (!qInfo->IsWeekly() || m_weeklyquests.empty()) return true; @@ -16081,7 +16081,7 @@ bool Player::SatisfyQuestSeasonal(Quest const* qInfo, bool /*msg*/) const return itr->second.find(qInfo->GetQuestId()) == itr->second.end(); } -bool Player::SatisfyQuestMonth(Quest const* qInfo, bool /*msg*/) +bool Player::SatisfyQuestMonth(Quest const* qInfo, bool /*msg*/) const { if (!qInfo->IsMonthly() || m_monthlyquests.empty()) return true; diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 8c3e2b8ea27..83ae71d25a1 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -1305,8 +1305,8 @@ class TC_GAME_API Player : public Unit, public GridObject<Player> bool CanAddQuest(Quest const* quest, bool msg) const; bool CanCompleteQuest(uint32 quest_id); bool CanCompleteRepeatableQuest(Quest const* quest); - bool CanRewardQuest(Quest const* quest, bool msg); - bool CanRewardQuest(Quest const* quest, uint32 reward, bool msg); + bool CanRewardQuest(Quest const* quest, bool msg) const; + bool CanRewardQuest(Quest const* quest, uint32 reward, bool msg) const; void AddQuestAndCheckCompletion(Quest const* quest, Object* questGiver); void AddQuest(Quest const* quest, Object* questGiver); void AbandonQuest(uint32 quest_id); @@ -1333,8 +1333,8 @@ class TC_GAME_API Player : public Unit, public GridObject<Player> bool SatisfyQuestNextChain(Quest const* qInfo, bool msg) const; bool SatisfyQuestPrevChain(Quest const* qInfo, bool msg); bool SatisfyQuestDay(Quest const* qInfo, bool msg) const; - bool SatisfyQuestWeek(Quest const* qInfo, bool msg); - bool SatisfyQuestMonth(Quest const* qInfo, bool msg); + bool SatisfyQuestWeek(Quest const* qInfo, bool msg) const; + bool SatisfyQuestMonth(Quest const* qInfo, bool msg) const; bool SatisfyQuestSeasonal(Quest const* qInfo, bool msg) const; bool GiveQuestSourceItem(Quest const* quest); bool TakeQuestSourceItem(uint32 questId, bool msg); |