summaryrefslogtreecommitdiff
path: root/src/game-server/itemmanager.cpp
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-07-12 19:47:25 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-07-12 19:47:25 +0000
commitce69890ac991fcac5c8ffb29591d68ab203d811a (patch)
treeed04511b6273121080de87b78088044c5062f9f8 /src/game-server/itemmanager.cpp
parent21c0c9d07b897235b422c004394325dd07daa304 (diff)
downloadmanaserv-ce69890ac991fcac5c8ffb29591d68ab203d811a.tar.gz
manaserv-ce69890ac991fcac5c8ffb29591d68ab203d811a.tar.bz2
manaserv-ce69890ac991fcac5c8ffb29591d68ab203d811a.tar.xz
manaserv-ce69890ac991fcac5c8ffb29591d68ab203d811a.zip
Added support for visible equipment.
Diffstat (limited to 'src/game-server/itemmanager.cpp')
-rw-r--r--src/game-server/itemmanager.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/game-server/itemmanager.cpp b/src/game-server/itemmanager.cpp
index ea63be2e..80035847 100644
--- a/src/game-server/itemmanager.cpp
+++ b/src/game-server/itemmanager.cpp
@@ -86,6 +86,7 @@ void ItemManager::initialize(std::string const &itemReferenceFile)
int weight = XML::getProperty(node, "weight", 0);
int value = XML::getProperty(node, "value", 0);
int maxPerSlot = XML::getProperty(node, "max_per_slot", 0);
+ int sprite = XML::getProperty(node, "sprite_id", 0);
std::string scriptName = XML::getProperty(node, "script_name", std::string());
//TODO: add child nodes for these modifiers (additive and factor)
@@ -111,6 +112,7 @@ void ItemManager::initialize(std::string const &itemReferenceFile)
item->setMaxPerSlot(maxPerSlot);
item->setScriptName(scriptName);
item->setModifiers(modifiers);
+ item->setSpriteID(sprite ? sprite : id);
itemClasses[id] = item;
++nbItems;