summaryrefslogtreecommitdiff
path: root/src/resources/db
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-29 20:45:25 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-30 00:03:19 +0300
commit12a8d0a76439f0e5a0c548fbe2752fcb144b10be (patch)
treee81f2333d549f98f7998d10a8b2e181eb61e1136 /src/resources/db
parentbd10eec0009a0b90b246b07829d176a360d7bccb (diff)
downloadmanaplus-12a8d0a76439f0e5a0c548fbe2752fcb144b10be.tar.gz
manaplus-12a8d0a76439f0e5a0c548fbe2752fcb144b10be.tar.bz2
manaplus-12a8d0a76439f0e5a0c548fbe2752fcb144b10be.tar.xz
manaplus-12a8d0a76439f0e5a0c548fbe2752fcb144b10be.zip
Move basic skill definition fro net into statdb.
Diffstat (limited to 'src/resources/db')
-rw-r--r--src/resources/db/statdb.cpp23
-rw-r--r--src/resources/db/statdb.h2
2 files changed, 20 insertions, 5 deletions
diff --git a/src/resources/db/statdb.cpp b/src/resources/db/statdb.cpp
index 2fc2d592c..41c4b6c44 100644
--- a/src/resources/db/statdb.cpp
+++ b/src/resources/db/statdb.cpp
@@ -29,22 +29,35 @@
#include "resources/item/itemfieldtype.h"
+#include "utils/gettext.h"
+
#include "debug.h"
namespace
{
bool mLoaded = false;
- static std::vector<ItemDB::Stat> extraStats;
+ static std::vector<ItemDB::Stat> mBasicStats;
} // namespace
-void StatDb::setStatsList(const std::vector<ItemDB::Stat> &stats)
+void StatDb::addBasicStats()
{
- extraStats = stats;
+ // TRANSLATORS: player stat
+ mBasicStats.push_back(ItemDB::Stat("str", _("Strength %s")));
+ // TRANSLATORS: player stat
+ mBasicStats.push_back(ItemDB::Stat("agi", _("Agility %s")));
+ // TRANSLATORS: player stat
+ mBasicStats.push_back(ItemDB::Stat("vit", _("Vitality %s")));
+ // TRANSLATORS: player stat
+ mBasicStats.push_back(ItemDB::Stat("int", _("Intelligence %s")));
+ // TRANSLATORS: player stat
+ mBasicStats.push_back(ItemDB::Stat("dex", _("Dexterity %s")));
+ // TRANSLATORS: player stat
+ mBasicStats.push_back(ItemDB::Stat("luck", _("Luck %s")));
}
const std::vector<ItemDB::Stat> &StatDb::getExtraStats()
{
- return extraStats;
+ return mBasicStats;
}
void StatDb::load()
@@ -54,6 +67,8 @@ void StatDb::load()
logger->log1("Initializing stat database...");
+ addBasicStats();
+
loadXmlFile(paths.getStringValue("statFile"), SkipError_false);
loadXmlFile(paths.getStringValue("statPatchFile"), SkipError_true);
loadXmlDir("statPatchDir", loadXmlFile);
diff --git a/src/resources/db/statdb.h b/src/resources/db/statdb.h
index 860235439..247c50ddb 100644
--- a/src/resources/db/statdb.h
+++ b/src/resources/db/statdb.h
@@ -39,7 +39,7 @@ namespace StatDb
void loadXmlFile(const std::string &fileName,
const SkipError skipError);
- void setStatsList(const std::vector<ItemDB::Stat> &stats);
+ void addBasicStats();
const std::vector<ItemDB::Stat> &getExtraStats();
} // namespace StatDb