summaryrefslogtreecommitdiff
path: root/src/resources/itemdb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/itemdb.cpp')
-rw-r--r--src/resources/itemdb.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp
index e6f2fd1f..f4ccc511 100644
--- a/src/resources/itemdb.cpp
+++ b/src/resources/itemdb.cpp
@@ -19,12 +19,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <algorithm>
#include <cassert>
+
#include <libxml/tree.h>
#include "itemdb.h"
-
#include "iteminfo.h"
#include "resourcemanager.h"
@@ -83,7 +82,7 @@ void ItemDB::load()
}
int type = XML::getProperty(node, "type", 0);
- int weight = XML::getProperty(node, "weight", 0);
+ //int weight = XML::getProperty(node, "weight", 0);
int view = XML::getProperty(node, "view", 0);
std::string name = XML::getProperty(node, "name", "");
@@ -101,7 +100,7 @@ void ItemDB::load()
itemInfo->setEffect(effect);
itemInfo->setType(type);
itemInfo->setView(view);
- itemInfo->setWeight(weight);
+ //itemInfo->setWeight(weight);
itemInfo->setWeaponType(weaponType);
for_each_xml_child_node(itemChild, node)
@@ -126,7 +125,7 @@ void ItemDB::load()
CHECK_PARAM(name, "");
CHECK_PARAM(image, "");
CHECK_PARAM(description, "");
- CHECK_PARAM(effect, "");
+ // CHECK_PARAM(effect, "");
// CHECK_PARAM(type, 0);
// CHECK_PARAM(weight, 0);
// CHECK_PARAM(slot, 0);
@@ -144,7 +143,7 @@ void ItemDB::unload()
delete mUnknown;
mUnknown = NULL;
- for_each(mItemInfos.begin(), mItemInfos.end(), make_dtor(mItemInfos));
+ delete_all(mItemInfos);
mItemInfos.clear();
mLoaded = false;
}
@@ -175,7 +174,6 @@ void loadSpriteRef(ItemInfo *itemInfo, xmlNodePtr node)
{
itemInfo->setSprite(filename, 0);
}
-
if (gender == "female" || gender == "unisex")
{
itemInfo->setSprite(filename, 1);