M_WXRenWuCFG.h 833 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct M_WXRenWuCFGData
  5. {
  6. //任务ID
  7. int mID;
  8. //任务组
  9. int mGroup;
  10. //炮倍解锁
  11. std::vector<int> mCannonFold;
  12. //名字
  13. std::string mName;
  14. //完成条件类型
  15. int mCompleteType;
  16. //特殊参数,填0不生效。对任务捕获指定鱼需要填写
  17. int mCompleteParam;
  18. //完成计数
  19. int mCompleteCount;
  20. //奖励物品ID
  21. std::vector<int> mAwardItemIDs;
  22. //奖励物品数量
  23. std::vector<int> mAwardItemCounts;
  24. };
  25. class M_WXRenWuCFG
  26. {
  27. public:
  28. private:
  29. static std::auto_ptr<M_WXRenWuCFG> msSingleton;
  30. public:
  31. int GetCount();
  32. const M_WXRenWuCFGData* GetData(int ID);
  33. boost::unordered_map<int, M_WXRenWuCFGData>& GetMapData();
  34. void Reload();
  35. void Load(const std::string& path);
  36. void Load();
  37. static M_WXRenWuCFG* GetSingleton();
  38. private:
  39. boost::unordered_map<int, M_WXRenWuCFGData> mMapData;
  40. };