From 98731375f9a39319cf2c30274f2ee73a139ba4f0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 12 Feb 2011 04:18:44 +0200 Subject: Add support for items attribute RemoveSprite. Usefull for example for hiding hair if equiped helmet. --- src/resources/itemdb.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/resources/itemdb.cpp') diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp index 826912b33..075104516 100644 --- a/src/resources/itemdb.cpp +++ b/src/resources/itemdb.cpp @@ -204,6 +204,7 @@ void ItemDB::load() std::string attackAction = XML::getProperty(node, "attack-action", ""); std::string drawBefore = XML::getProperty(node, "drawBefore", ""); std::string drawAfter = XML::getProperty(node, "drawAfter", ""); + std::string removeSprite = XML::getProperty(node, "removeSprite", ""); std::string tags[3]; tags[0] = XML::getProperty(node, "tag", @@ -263,6 +264,7 @@ void ItemDB::load() itemInfo->setDrawBefore(parseSpriteName(drawBefore)); itemInfo->setDrawAfter(parseSpriteName(drawAfter)); itemInfo->setDrawPriority(drawPriority); + itemInfo->setRemoveSprite(parseSpriteName(removeSprite)); std::string effect; for (int i = 0; i < int(sizeof(fields) / sizeof(fields[0])); ++i) -- cgit v1.2.3-70-g09d2