summaryrefslogtreecommitdiff
path: root/src/game-server/itemmanager.h
diff options
context:
space:
mode:
authorPrzemysław Grzywacz <nexather@gmail.com>2013-04-28 16:15:20 +0200
committerErik Schilling <ablu.erikschilling@googlemail.com>2013-04-29 22:43:54 +0200
commit647cebfdf11c2482e5b4bbaad4aa411cdd4bb2cc (patch)
treeed63cbbde80f2d39175cac4544217ec7d6cdf8e6 /src/game-server/itemmanager.h
parenta8defa22243de756842a78fe36a4b76091915987 (diff)
downloadmanaserv-647cebfdf11c2482e5b4bbaad4aa411cdd4bb2cc.tar.gz
manaserv-647cebfdf11c2482e5b4bbaad4aa411cdd4bb2cc.tar.bz2
manaserv-647cebfdf11c2482e5b4bbaad4aa411cdd4bb2cc.tar.xz
manaserv-647cebfdf11c2482e5b4bbaad4aa411cdd4bb2cc.zip
Single xml solution
Mana-mantis: #506.
Diffstat (limited to 'src/game-server/itemmanager.h')
-rw-r--r--src/game-server/itemmanager.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/game-server/itemmanager.h b/src/game-server/itemmanager.h
index 6a1f459b..ac3c0b84 100644
--- a/src/game-server/itemmanager.h
+++ b/src/game-server/itemmanager.h
@@ -51,9 +51,7 @@ struct EquipSlotInfo
class ItemManager
{
public:
- ItemManager(const std::string &itemFile, const std::string &equipFile) :
- mItemsFile(itemFile),
- mEquipSlotsFile(equipFile),
+ ItemManager() :
mVisibleEquipSlotCount(0),
mItemDatabaseVersion(0)
{}
@@ -103,13 +101,13 @@ class ItemManager
bool isEquipSlotVisible(unsigned id) const;
- private:
- /** Loads the equip slots that a character has available to them. */
- void readEquipSlotsFile();
+ void readItemNode(xmlNodePtr itemNode, const std::string &filename);
+
+ void readEquipSlotNode(xmlNodePtr node);
- /** Loads the main item database. */
- void readItemsFile();
- void readItemNode(xmlNodePtr itemNode);
+ void checkStatus();
+
+ private:
void readEquipNode(xmlNodePtr equipNode, ItemClass *item);
void readEffectNode(xmlNodePtr effectNode, ItemClass *item);
@@ -127,8 +125,6 @@ class ItemManager
// We only keep a pointer to it: The id map will take care of deletion.
utils::NameMap<EquipSlotInfo* > mNamedEquipSlotsInfo;
- std::string mItemsFile;
- std::string mEquipSlotsFile;
unsigned mVisibleEquipSlotCount; // Cache
/** Version of the loaded items database file.*/