summaryrefslogtreecommitdiff
path: root/src/resources/db/itemdb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-29 18:57:21 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-30 00:03:19 +0300
commitbd10eec0009a0b90b246b07829d176a360d7bccb (patch)
treeb957a1e744c672cceb107689a94d292c6d2b8aa7 /src/resources/db/itemdb.cpp
parentaa47227c8d93bcc3d225c51461c9c8af113bfcc1 (diff)
downloadplus-bd10eec0009a0b90b246b07829d176a360d7bccb.tar.gz
plus-bd10eec0009a0b90b246b07829d176a360d7bccb.tar.bz2
plus-bd10eec0009a0b90b246b07829d176a360d7bccb.tar.xz
plus-bd10eec0009a0b90b246b07829d176a360d7bccb.zip
Add statdb. Move to statdb server related stats list.
Diffstat (limited to 'src/resources/db/itemdb.cpp')
-rw-r--r--src/resources/db/itemdb.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp
index 0421d7d88..323412e08 100644
--- a/src/resources/db/itemdb.cpp
+++ b/src/resources/db/itemdb.cpp
@@ -37,6 +37,7 @@
#include "resources/db/itemdbstat.h"
#include "resources/db/itemfielddb.h"
+#include "resources/db/statdb.h"
#include "net/serverfeatures.h"
@@ -77,13 +78,6 @@ static void loadOrderSprite(ItemInfo *const itemInfo,
static int parseSpriteName(const std::string &name);
static int parseDirectionName(const std::string &name);
-static std::vector<ItemDB::Stat> extraStats;
-
-void ItemDB::setStatsList(const std::vector<ItemDB::Stat> &stats)
-{
- extraStats = stats;
-}
-
static ItemDbTypeT itemTypeFromString(const std::string &name)
{
const size_t sz = sizeof(itemTypeMap) / sizeof(itemTypeMap[0]);
@@ -519,6 +513,7 @@ void ItemDB::loadXmlFile(const std::string &fileName,
std::string effect;
readFields(effect, node, requiredFields);
readFields(effect, node, addFields);
+ const std::vector<Stat> &extraStats = StatDb::getExtraStats();
FOR_EACH (std::vector<Stat>::const_iterator, it, extraStats)
{
std::string value = XML::getProperty(