M_NoviceAchievementCFG.h 878 B

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