From 77b2116504635c855c357dbabb9dd1e7f6620a75 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 3 Mar 2018 04:04:11 +0300 Subject: Add support for reading item stats from tags addStats and requireStats. --- src/resources/db/itemdb.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3-70-g09d2