M_ActiveTurntable.h 628 B

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct M_ActiveTurntableData
  5. {
  6. //ID
  7. int mID;
  8. //转盘中用于客户端显示奖励道具
  9. std::string mShowAwardItemIDs;
  10. //礼包ID
  11. int mGiftPackageID;
  12. };
  13. class M_ActiveTurntable
  14. {
  15. public:
  16. private:
  17. static std::auto_ptr<M_ActiveTurntable> msSingleton;
  18. public:
  19. int GetCount();
  20. const M_ActiveTurntableData* GetData(int ID);
  21. boost::unordered_map<int, M_ActiveTurntableData>& GetMapData();
  22. void Reload();
  23. void Load(const std::string& path);
  24. void Load();
  25. static M_ActiveTurntable* GetSingleton();
  26. private:
  27. boost::unordered_map<int, M_ActiveTurntableData> mMapData;
  28. };