M_ActivityLeiChongCFG.h 758 B

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct M_ActivityLeiChongCFGData
  5. {
  6. //编号
  7. int mID;
  8. //描述
  9. std::string mDsc;
  10. //完成条件类型
  11. int mCompleteType;
  12. //完成计数
  13. int mCompleteCount;
  14. //奖励物品ID
  15. std::vector<int> mAwardItemIDs;
  16. //奖励物品数量
  17. std::vector<int> mAwardItemCounts;
  18. };
  19. class M_ActivityLeiChongCFG
  20. {
  21. public:
  22. private:
  23. static std::auto_ptr<M_ActivityLeiChongCFG> msSingleton;
  24. public:
  25. int GetCount();
  26. const M_ActivityLeiChongCFGData* GetData(int ID);
  27. boost::unordered_map<int, M_ActivityLeiChongCFGData>& GetMapData();
  28. void Reload();
  29. void Load(const std::string& path);
  30. void Load();
  31. static M_ActivityLeiChongCFG* GetSingleton();
  32. private:
  33. boost::unordered_map<int, M_ActivityLeiChongCFGData> mMapData;
  34. };