M_RoomQuestCFG.h 989 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct M_RoomQuestCFGData
  5. {
  6. //任务ID
  7. int mID;
  8. //任务类型
  9. int mGroup;
  10. //今日可完成次数
  11. int mQuantityCompleted;
  12. //名字
  13. std::string mName;
  14. //显示任务资源
  15. std::string mSourse;
  16. //完成条件类型
  17. int mCompleteType;
  18. //特殊参数,填0不生效。对任务捕获指定鱼需要填写
  19. int mCompleteParam;
  20. //完成计数
  21. int mCompleteCount;
  22. //可完成次数
  23. int mDailyCptCount;
  24. //奖励物品ID
  25. std::vector<int> mAwardItemIDs;
  26. //奖励物品数量
  27. std::vector<int> mAwardItemCounts;
  28. //前往类型
  29. int mGoType;
  30. //搜索范围
  31. std::vector<int> mFindRand;
  32. };
  33. class M_RoomQuestCFG
  34. {
  35. public:
  36. private:
  37. static std::auto_ptr<M_RoomQuestCFG> msSingleton;
  38. public:
  39. int GetCount();
  40. const M_RoomQuestCFGData* GetData(int ID);
  41. boost::unordered_map<int, M_RoomQuestCFGData>& GetMapData();
  42. void Reload();
  43. void Load(const std::string& path);
  44. void Load();
  45. static M_RoomQuestCFG* GetSingleton();
  46. private:
  47. boost::unordered_map<int, M_RoomQuestCFGData> mMapData;
  48. };