M_LevelCFG.h 606 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct M_LevelCFGData
  5. {
  6. //µÈ¼¶
  7. int mLevel;
  8. //Éý¼¶¾­ÑéÖµ
  9. std::string mNeedExp;
  10. //½±Àø½ð±Ò
  11. std::vector<int> mAward;
  12. //Éý¼¶ICON
  13. std::string mLevelUpIcon;
  14. };
  15. class M_LevelCFG
  16. {
  17. public:
  18. private:
  19. static std::auto_ptr<M_LevelCFG> msSingleton;
  20. public:
  21. int GetCount();
  22. const M_LevelCFGData* GetData(int Level);
  23. boost::unordered_map<int, M_LevelCFGData>& GetMapData();
  24. void Reload();
  25. void Load(const std::string& path);
  26. void Load();
  27. static M_LevelCFG* GetSingleton();
  28. private:
  29. boost::unordered_map<int, M_LevelCFGData> mMapData;
  30. };