aboutsummaryrefslogtreecommitdiff
path: root/src/game/Player.cpp
diff options
context:
space:
mode:
authorXanadu <none@none>2010-03-23 16:10:18 +0100
committerXanadu <none@none>2010-03-23 16:10:18 +0100
commitcfc094040f7ce3924fd024c93c82eaf0b0498c8d (patch)
tree1d9a66e4c18ee8c8f9f0eec8b2842301c743dfba /src/game/Player.cpp
parenta348b591a70b2d9f5acc890ec6f21649fddc93e1 (diff)
Added support for maximum allowed player level for quests. By Gyullo.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r--src/game/Player.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 98e3535df30..e7179ecf444 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -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;