M_RoomQuestCFG.h 937 B

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