Core/Quest: send INVALIDREASON_QUEST_ALREADY_DONE if player tries to accept a quest that is already rewarded.

(cherry picked from commit 9bca68fb56a48870548d9f27857d3d879eb77adb)
This commit is contained in:
SnapperRy
2017-03-05 01:06:43 +01:00
committed by joschiwald
parent f1fd4b5333
commit de8aecacbc
@@ -15609,6 +15609,17 @@ bool Player::SatisfyQuestReputation(Quest const* qInfo, bool msg)
bool Player::SatisfyQuestStatus(Quest const* qInfo, bool msg) const
{
if (GetQuestStatus(qInfo->GetQuestId()) == QUEST_STATUS_REWARDED)
{
if (msg)
{
SendCanTakeQuestResponse(QUEST_ERR_ALREADY_DONE);
TC_LOG_DEBUG("misc", "Player::SatisfyQuestStatus: Sent QUEST_STATUS_REWARDED (QuestID: %u) because player '%s' (%s) quest status is already REWARDED.",
qInfo->GetQuestId(), GetName().c_str(), GetGUID().ToString().c_str());
}
return false;
}
if (GetQuestStatus(qInfo->GetQuestId()) != QUEST_STATUS_NONE)
{
if (msg)