diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-02-10 05:09:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-02-11 04:28:43 +0300 |
commit | ce34b402281f75cb1e9d214c925382fdc522455b (patch) | |
tree | 6d2cb57028ad67449da2ab4f95ef7f562d1d4823 /src/resources/db/itemoptiondb.cpp | |
parent | 29181589eb79d3afdf337e2517b4fa43d8bbdd59 (diff) | |
download | plus-ce34b402281f75cb1e9d214c925382fdc522455b.tar.gz plus-ce34b402281f75cb1e9d214c925382fdc522455b.tar.bz2 plus-ce34b402281f75cb1e9d214c925382fdc522455b.tar.xz plus-ce34b402281f75cb1e9d214c925382fdc522455b.zip |
Move reading and combining item stats into separate file.
Diffstat (limited to 'src/resources/db/itemoptiondb.cpp')
-rw-r--r-- | src/resources/db/itemoptiondb.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/resources/db/itemoptiondb.cpp b/src/resources/db/itemoptiondb.cpp index 204fafb34..e983cd801 100644 --- a/src/resources/db/itemoptiondb.cpp +++ b/src/resources/db/itemoptiondb.cpp @@ -51,14 +51,14 @@ void ItemOptionDb::load() static void addFieldByName(STD_VECTOR<ItemFieldType*> &options, XmlNodeConstPtr node, - const ItemFieldDb::FieldInfos &fields, + const ItemFieldInfos &fields, const char *const name) { std::string value = XML::getProperty(node, name, ""); if (value.empty()) return; - FOR_EACH (ItemFieldDb::FieldInfos::const_iterator, it, fields) + FOR_EACH (ItemFieldInfos::const_iterator, it, fields) { const std::string fieldName = (*it).first; if (fieldName == value) @@ -71,7 +71,7 @@ static void addFieldByName(STD_VECTOR<ItemFieldType*> &options, static void readOptionFields(STD_VECTOR<ItemFieldType*> &options, XmlNodeConstPtr node, - const ItemFieldDb::FieldInfos &fields) + const ItemFieldInfos &fields) { addFieldByName(options, node, fields, "field"); for (int f = 0; f < 15; f ++) @@ -104,9 +104,9 @@ void ItemOptionDb::loadXmlFile(const std::string &fileName, return; } - const ItemFieldDb::FieldInfos &requiredFields = + const ItemFieldInfos &requiredFields = ItemFieldDb::getRequiredFields(); - const ItemFieldDb::FieldInfos &addFields = + const ItemFieldInfos &addFields = ItemFieldDb::getAddFields(); for_each_xml_child_node(node, rootNode) |