#pragma once #include #include struct M_equipmentData { //ID int mID; //装备类型 int mitemType; //装备等级 int mleve; //装备品质 std::string mquality; //所需材料(道具ID,数量) std::vector mcost1; //所需材料(道具ID,数量) std::vector mcost2; //奖励(道具ID,数量) std::vector mreward; //攻击 int matk; //生命 int mhp; //攻击百分比 int matkpct; //生命百分比 int mhppct; //暴击百分比 int mcrtpct; //移动百分比 int mmovepct; }; class M_equipment { public: private: static std::auto_ptr msSingleton; public: int GetCount(); const M_equipmentData* GetData(int ID); boost::unordered_map& GetMapData(); void Reload(); void Load(const std::string& path); void Load(); static M_equipment* GetSingleton(); private: boost::unordered_map mMapData; };