mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
Added support for maximum allowed player level for quests. By Gyullo.
--HG-- branch : trunk
This commit is contained in:
@@ -14226,7 +14226,13 @@ bool Player::SatisfyQuestLevel(Quest const* qInfo, bool msg)
|
||||
if (getLevel() < qInfo->GetMinLevel())
|
||||
{
|
||||
if(msg)
|
||||
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
|
||||
SendCanTakeQuestResponse(INVALIDREASON_QUEST_FAILED_LOW_LEVEL);
|
||||
return false;
|
||||
}
|
||||
else if (qInfo->GetMaxLevel() > 0 && getLevel() > qInfo->GetMaxLevel())
|
||||
{
|
||||
if(msg)
|
||||
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ); // There doesn't seem to be a specific response for too high player level
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user