M_NoviceAchievementCFG.h 930 B

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