summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-03-03 04:04:11 +0300
committerAndrei Karas <akaras@inbox.ru>2018-03-03 04:04:11 +0300
commit77b2116504635c855c357dbabb9dd1e7f6620a75 (patch)
tree05b320198197ebeff66384191a8aa5667aab0fcf /src
parentf18d40351434f7baff2ddf1d34933c19cada5dba (diff)
downloadmanaverse-77b2116504635c855c357dbabb9dd1e7f6620a75.tar.gz
manaverse-77b2116504635c855c357dbabb9dd1e7f6620a75.tar.bz2
manaverse-77b2116504635c855c357dbabb9dd1e7f6620a75.tar.xz
manaverse-77b2116504635c855c357dbabb9dd1e7f6620a75.zip
Add support for reading item stats from tags addStats and requireStats.
Diffstat (limited to 'src')
-rw-r--r--src/resources/db/itemdb.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp
index 6410f8f8f..c91d74ffd 100644
--- a/src/resources/db/itemdb.cpp
+++ b/src/resources/db/itemdb.cpp
@@ -565,7 +565,6 @@ void ItemDB::loadXmlFile(const std::string &fileName,
itemInfo->setMaxFloorOffsetY(maxFloorOffsetY);
itemInfo->setPickupCursor(XML::getProperty(
node, "pickupCursor", "pickup"));
- itemInfo->setEffect(effect);
MissileInfo &missile = itemInfo->getMissile();
missile.particle = STD_MOVE(missileParticle);
@@ -617,7 +616,16 @@ void ItemDB::loadXmlFile(const std::string &fileName,
{
loadMenu(itemChild, itemInfo->getCartMenu());
}
+ else if (xmlNameEqual(itemChild, "addStats"))
+ {
+ readItemStatsString(effect, itemChild, addFields);
+ }
+ else if (xmlNameEqual(itemChild, "requireStats"))
+ {
+ readItemStatsString(effect, itemChild, requiredFields);
+ }
}
+ itemInfo->setEffect(effect);
/*
logger->log("start dump item: %d", id);