diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-11-19 21:49:38 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-11-19 21:52:21 +0300 |
commit | 10cf52b5ab6a9e1bb8328d9859b11d885fd5eef9 (patch) | |
tree | 0bbedbb7883e08901d4a787cac2f2dc6902f1279 /src/net | |
parent | 7929cda3c6a65f8707b753e7190a4ca89891fd7e (diff) | |
download | mv-10cf52b5ab6a9e1bb8328d9859b11d885fd5eef9.tar.gz mv-10cf52b5ab6a9e1bb8328d9859b11d885fd5eef9.tar.bz2 mv-10cf52b5ab6a9e1bb8328d9859b11d885fd5eef9.tar.xz mv-10cf52b5ab6a9e1bb8328d9859b11d885fd5eef9.zip |
Add limits for creating chars (hair color, hair style, stats).
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/ea/charserverhandler.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp index 0c01959f2..d71236496 100644 --- a/src/net/ea/charserverhandler.cpp +++ b/src/net/ea/charserverhandler.cpp @@ -35,6 +35,8 @@ #include "utils/gettext.h" +#include "resources/chardb.h" + #include "debug.h" extern Net::CharHandler *charHandler; @@ -70,7 +72,17 @@ void CharServerHandler::setCharCreateDialog(CharCreateDialog *window) const Token &token = static_cast<LoginHandler*>(Net::getLoginHandler())->getToken(); - mCharCreateDialog->setAttributes(attributes, 30, 1, 9); + int minStat = CharDB::getMinStat(); + if (!minStat) + minStat = 1; + int maxStat = CharDB::getMaxStat(); + if (!maxStat) + maxStat = 9; + int sumStat = CharDB::getSumStat(); + if (!sumStat) + sumStat = 30; + + mCharCreateDialog->setAttributes(attributes, sumStat, minStat, maxStat); mCharCreateDialog->setFixedGender(true, token.sex); } |