M_VipVolvoCFG.h 758 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct M_VipVolvoCFGData
  5. {
  6. //编号
  7. int mID;
  8. //需要vip等级
  9. int mVipLevel;
  10. //类型
  11. int mtype;
  12. //任务内容
  13. std::string mTask;
  14. //完成条件类型
  15. int mCompleteType;
  16. //完成计数
  17. int mCompleteCount;
  18. //奖励物品ID
  19. std::vector<int> mAwardItemIDs;
  20. //奖励物品数量
  21. std::vector<int> mAwardItemCounts;
  22. };
  23. class M_VipVolvoCFG
  24. {
  25. public:
  26. private:
  27. static std::auto_ptr<M_VipVolvoCFG> msSingleton;
  28. public:
  29. int GetCount();
  30. const M_VipVolvoCFGData* GetData(int ID);
  31. boost::unordered_map<int, M_VipVolvoCFGData>& GetMapData();
  32. void Reload();
  33. void Load(const std::string& path);
  34. void Load();
  35. static M_VipVolvoCFG* GetSingleton();
  36. private:
  37. boost::unordered_map<int, M_VipVolvoCFGData> mMapData;
  38. };