M_RechangeLotteryCFG.h 640 B

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct M_RechangeLotteryCFGData
  5. {
  6. //中奖翻倍
  7. int mMuch;
  8. //首次几率(10000)
  9. int mFirstRate;
  10. //默认几率(10000)
  11. int mDefaultRate;
  12. };
  13. class M_RechangeLotteryCFG
  14. {
  15. public:
  16. private:
  17. static std::auto_ptr<M_RechangeLotteryCFG> msSingleton;
  18. public:
  19. int GetCount();
  20. const M_RechangeLotteryCFGData* GetData(int Much);
  21. boost::unordered_map<int, M_RechangeLotteryCFGData>& GetMapData();
  22. void Reload();
  23. void Load(const std::string& path);
  24. void Load();
  25. static M_RechangeLotteryCFG* GetSingleton();
  26. private:
  27. boost::unordered_map<int, M_RechangeLotteryCFGData> mMapData;
  28. };