M_DailyQuestCFG.h 955 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct M_DailyQuestCFGData
  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. int mGoType;
  26. //搜索范围
  27. std::vector<int> mFindRand;
  28. //转化类型
  29. int mShowChangeType;
  30. };
  31. class M_DailyQuestCFG
  32. {
  33. public:
  34. private:
  35. static std::auto_ptr<M_DailyQuestCFG> msSingleton;
  36. public:
  37. int GetCount();
  38. const M_DailyQuestCFGData* GetData(int ID);
  39. boost::unordered_map<int, M_DailyQuestCFGData>& GetMapData();
  40. void Reload();
  41. void Load(const std::string& path);
  42. void Load();
  43. static M_DailyQuestCFG* GetSingleton();
  44. private:
  45. boost::unordered_map<int, M_DailyQuestCFGData> mMapData;
  46. };