M_ActivityDBFSignCFG.h 732 B

123456789101112131415161718192021222324252627282930313233
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct M_ActivityDBFSignCFGData
  5. {
  6. //天数
  7. int mDay;
  8. //奖励物品
  9. std::vector<int> mRewardItem;
  10. //奖励数量
  11. std::vector<int> mRewardQuantity;
  12. //显示
  13. std::vector<int> mDisplay;
  14. //显示数量
  15. std::vector<int> mDisplayQuantity;
  16. };
  17. class M_ActivityDBFSignCFG
  18. {
  19. public:
  20. private:
  21. static std::auto_ptr<M_ActivityDBFSignCFG> msSingleton;
  22. public:
  23. int GetCount();
  24. const M_ActivityDBFSignCFGData* GetData(int Day);
  25. boost::unordered_map<int, M_ActivityDBFSignCFGData>& GetMapData();
  26. void Reload();
  27. void Load(const std::string& path);
  28. void Load();
  29. static M_ActivityDBFSignCFG* GetSingleton();
  30. private:
  31. boost::unordered_map<int, M_ActivityDBFSignCFGData> mMapData;
  32. };