summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2005-04-21 17:19:32 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2005-04-21 17:19:32 +0000
commit00b3b347f845f8b1550777f09464463af3805098 (patch)
tree7d0a4d5da82e71081efd0ad11b9b505964614778 /src/resources
parent56fef6eed9e3145b5e7d33e066069f642873d7a1 (diff)
downloadmana-00b3b347f845f8b1550777f09464463af3805098.tar.gz
mana-00b3b347f845f8b1550777f09464463af3805098.tar.bz2
mana-00b3b347f845f8b1550777f09464463af3805098.tar.xz
mana-00b3b347f845f8b1550777f09464463af3805098.zip
maybe Hammerbear will like it this way?
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/itemmanager.cpp5
-rw-r--r--src/resources/itemmanager.h1
2 files changed, 5 insertions, 1 deletions
diff --git a/src/resources/itemmanager.cpp b/src/resources/itemmanager.cpp
index eb75321d..6453b55c 100644
--- a/src/resources/itemmanager.cpp
+++ b/src/resources/itemmanager.cpp
@@ -107,6 +107,9 @@ ItemManager::ItemManager()
} else {
logger.log("Error while parsing item database!");
}
+
+ unknown = new ItemInfo();
+ unknown->setName("Unknown item");
}
ItemManager::~ItemManager()
@@ -118,6 +121,6 @@ ItemInfo *ItemManager::getItemInfo(int id)
if (db.find(id) != db.end())
return db[id];
else
- return NULL;
+ return unknown;
}
diff --git a/src/resources/itemmanager.h b/src/resources/itemmanager.h
index b4c98e5b..8b8c437f 100644
--- a/src/resources/itemmanager.h
+++ b/src/resources/itemmanager.h
@@ -50,6 +50,7 @@ class ItemManager
protected:
// Items database
std::map <int, ItemInfo *> db;
+ ItemInfo *unknown;
};
#endif