#ifndef DATMANAGER_H #define DATMANAGER_H #include #include "thing.h" class DatManager { public: bool load(const std::string& filename); void unload(); void parseThingAttributes(std::stringstream& fin, ThingAttributes& thingAttributes); void parseThingAttributesOpt(std::stringstream& fin, ThingAttributes& thingAttributes, uint8 opt); ThingAttributes& getItemAttributes(uint16 id) { return m_itemsAttributes[id - 100]; } ThingAttributes& getCreatureAttributes(uint16 id) { return m_creaturesAttributes[id]; } ThingAttributes& getEffectAttributes(uint16 id) { return m_effectsAttributes[id]; } ThingAttributes& getShotAttributes(uint16 id) { return m_shotsAttributes[id]; } uint32 getSignature() { return m_signature; } private: uint32 m_signature; std::vector m_itemsAttributes; std::vector m_creaturesAttributes; std::vector m_effectsAttributes; std::vector m_shotsAttributes; }; extern DatManager g_dat; #endif