M_NewPlayerQuestCFG.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct M_NewPlayerQuestCFGData
  5. {
  6. //任务ID
  7. int mID;
  8. //任务类型
  9. int mCompleteType;
  10. //描述
  11. std::string mDesc;
  12. //特殊参数,填0不生效。对任务捕获指定鱼需要填写
  13. int mCompleteParam;
  14. //完成计数
  15. int mCompleteCount;
  16. //任务图标资源
  17. std::string mResources;
  18. //后续任务id
  19. int mNextQuestID;
  20. //图标缩放*100
  21. int mScale;
  22. //初始化
  23. int mDefault;
  24. //奖励物品ID
  25. std::vector<int> mAwardItemIDs;
  26. //奖励物品数量
  27. std::vector<int> mAwardItemCounts;
  28. //话费
  29. int mTelephoneBill;
  30. //任务icon
  31. std::string mTaskIcon;
  32. //奖励icon
  33. std::string mRewardIcon;
  34. };
  35. class M_NewPlayerQuestCFG
  36. {
  37. public:
  38. private:
  39. static std::auto_ptr<M_NewPlayerQuestCFG> msSingleton;
  40. public:
  41. int GetCount();
  42. const M_NewPlayerQuestCFGData* GetData(int ID);
  43. boost::unordered_map<int, M_NewPlayerQuestCFGData>& GetMapData();
  44. void Reload();
  45. void Load(const std::string& path);
  46. void Load();
  47. static M_NewPlayerQuestCFG* GetSingleton();
  48. private:
  49. boost::unordered_map<int, M_NewPlayerQuestCFGData> mMapData;
  50. };