Fish_JuKunFuHuaJiFenCFG.h 717 B

123456789101112131415161718192021222324252627282930313233
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct Fish_JuKunFuHuaJiFenCFGData
  5. {
  6. //编号
  7. int mID;
  8. //孵化积分下限
  9. int mIntegralLower;
  10. //孵化积分上限
  11. int mIntegralUpper;
  12. //权重
  13. int mWeight;
  14. //积分奖励
  15. std::vector<int> mBonusPoints;
  16. };
  17. class Fish_JuKunFuHuaJiFenCFG
  18. {
  19. public:
  20. private:
  21. static std::auto_ptr<Fish_JuKunFuHuaJiFenCFG> msSingleton;
  22. public:
  23. int GetCount();
  24. const Fish_JuKunFuHuaJiFenCFGData* GetData(int ID);
  25. boost::unordered_map<int, Fish_JuKunFuHuaJiFenCFGData>& GetMapData();
  26. void Reload();
  27. void Load(const std::string& path);
  28. void Load();
  29. static Fish_JuKunFuHuaJiFenCFG* GetSingleton();
  30. private:
  31. boost::unordered_map<int, Fish_JuKunFuHuaJiFenCFGData> mMapData;
  32. };