M_ActivitySummerPlanRoketCFG.h 723 B

123456789101112131415161718192021222324252627282930313233
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct M_ActivitySummerPlanRoketCFGData
  5. {
  6. //ID
  7. int mID;
  8. //高度
  9. int mHeight;
  10. //对应礼包ID
  11. int mGiftID;
  12. //权重
  13. int mWeight;
  14. //展示道具
  15. std::vector<int> mShowItem;
  16. };
  17. class M_ActivitySummerPlanRoketCFG
  18. {
  19. public:
  20. private:
  21. static std::auto_ptr<M_ActivitySummerPlanRoketCFG> msSingleton;
  22. public:
  23. int GetCount();
  24. const M_ActivitySummerPlanRoketCFGData* GetData(int ID);
  25. boost::unordered_map<int, M_ActivitySummerPlanRoketCFGData>& GetMapData();
  26. void Reload();
  27. void Load(const std::string& path);
  28. void Load();
  29. static M_ActivitySummerPlanRoketCFG* GetSingleton();
  30. private:
  31. boost::unordered_map<int, M_ActivitySummerPlanRoketCFGData> mMapData;
  32. };