M_ActivitySmashEggCFG.h 724 B

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct M_ActivitySmashEggCFGData
  5. {
  6. //编号
  7. int mID;
  8. //蛋名
  9. std::string mEggName;
  10. //锤子ID
  11. int mHammerId;
  12. //所需锤子数量
  13. int mHammerCount;
  14. //奖励积分Id
  15. int mIntegralId;
  16. //奖励积分数量
  17. int mIntegralCount;
  18. };
  19. class M_ActivitySmashEggCFG
  20. {
  21. public:
  22. private:
  23. static std::auto_ptr<M_ActivitySmashEggCFG> msSingleton;
  24. public:
  25. int GetCount();
  26. const M_ActivitySmashEggCFGData* GetData(int ID);
  27. boost::unordered_map<int, M_ActivitySmashEggCFGData>& GetMapData();
  28. void Reload();
  29. void Load(const std::string& path);
  30. void Load();
  31. static M_ActivitySmashEggCFG* GetSingleton();
  32. private:
  33. boost::unordered_map<int, M_ActivitySmashEggCFGData> mMapData;
  34. };