summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/resources/basicstat.h5
-rw-r--r--src/resources/db/itemdb.cpp18
-rw-r--r--src/resources/db/statdb.cpp28
3 files changed, 10 insertions, 41 deletions
diff --git a/src/resources/basicstat.h b/src/resources/basicstat.h
index a57581ffe..14ad90f03 100644
--- a/src/resources/basicstat.h
+++ b/src/resources/basicstat.h
@@ -33,17 +33,14 @@ struct BasicStat final
{
BasicStat(const AttributesT attr0,
const std::string &tag0,
- const std::string &name0,
- const std::string &format0) :
+ const std::string &name0) :
tag(tag0),
name(name0),
- format(format0),
attr(attr0)
{}
std::string tag;
std::string name;
- std::string format;
AttributesT attr;
};
diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp
index 4218771d6..aa6f66d6d 100644
--- a/src/resources/db/itemdb.cpp
+++ b/src/resources/db/itemdb.cpp
@@ -32,13 +32,12 @@
#include "resources/iteminfo.h"
#include "resources/itemtypemapdata.h"
+#include "resources/db/itemfielddb.h"
+
#include "resources/item/itemfieldtype.h"
#include "resources/sprite/spritereference.h"
-#include "resources/db/itemfielddb.h"
-#include "resources/db/statdb.h"
-
#include "net/serverfeatures.h"
#include "utils/checkutils.h"
@@ -513,19 +512,6 @@ void ItemDB::loadXmlFile(const std::string &fileName,
std::string effect;
readFields(effect, node, requiredFields);
readFields(effect, node, addFields);
- const std::vector<BasicStat> &extraStats = StatDb::getExtraStats();
- FOR_EACH (std::vector<BasicStat>::const_iterator, it, extraStats)
- {
- std::string value = XML::getProperty(
- node, it->tag.c_str(), "");
- if (value.empty())
- continue;
- if (!effect.empty())
- effect.append(" / ");
- if (isDigit(value))
- value = "+" + value;
- effect.append(strprintf(it->format.c_str(), value.c_str()));
- }
std::string temp = XML::langProperty(node, "effect", "");
if (!effect.empty() && !temp.empty())
effect.append(" / ");
diff --git a/src/resources/db/statdb.cpp b/src/resources/db/statdb.cpp
index 064ae0b84..e079d323a 100644
--- a/src/resources/db/statdb.cpp
+++ b/src/resources/db/statdb.cpp
@@ -44,39 +44,27 @@ void StatDb::addBasicStats()
mBasicStats.push_back(BasicStat(Attributes::STR,
"str",
// TRANSLATORS: player stat
- _("Strength"),
- // TRANSLATORS: player stat
- _("Strength %s")));
+ _("Strength")));
mBasicStats.push_back(BasicStat(Attributes::AGI,
"agi",
// TRANSLATORS: player stat
- _("Agility"),
- // TRANSLATORS: player stat
- _("Agility %s")));
+ _("Agility")));
mBasicStats.push_back(BasicStat(Attributes::VIT,
"vit",
// TRANSLATORS: player stat
- _("Vitality"),
- // TRANSLATORS: player stat
- _("Vitality %s")));
+ _("Vitality")));
mBasicStats.push_back(BasicStat(Attributes::INT,
"int",
// TRANSLATORS: player stat
- _("Intelligence"),
- // TRANSLATORS: player stat
- _("Intelligence %s")));
+ _("Intelligence")));
mBasicStats.push_back(BasicStat(Attributes::DEX,
"dex",
// TRANSLATORS: player stat
- _("Dexterity"),
- // TRANSLATORS: player stat
- _("Dexterity %s")));
+ _("Dexterity")));
mBasicStats.push_back(BasicStat(Attributes::LUK,
"luk",
// TRANSLATORS: player stat
- _("Luck"),
- // TRANSLATORS: player stat
- _("Luck %s")));
+ _("Luck")));
}
const std::vector<BasicStat> &StatDb::getExtraStats()
@@ -109,11 +97,9 @@ static void loadBasicStats(const XmlNodePtr rootNode)
continue;
const std::string tag = XML::getProperty(node, "tag", "");
const std::string name = XML::getProperty(node, "name", "");
- const std::string format = XML::getProperty(node, "format", "");
mBasicStats.push_back(BasicStat(static_cast<AttributesT>(id),
tag,
- name,
- format));
+ name));
}
}
}