Fish_NormalOutFishCFG1.h 867 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct Fish_NormalOutFishCFG1Data
  5. {
  6. //key
  7. int mID;
  8. //名字
  9. std::string mName;
  10. //类型
  11. int mType;
  12. //参数
  13. int mParamID;
  14. //出鱼权值
  15. int mOutWeight;
  16. //最大数量
  17. int mOutMaxCount;
  18. //路径分组
  19. int mRouteGroup;
  20. //出鱼时间(s)
  21. std::vector<int> mFishTime;
  22. //分组
  23. int mGroupID;
  24. //玩法鱼通知
  25. int mFishNotice;
  26. //分组最大鱼数
  27. int mGroupMaxFish;
  28. };
  29. class Fish_NormalOutFishCFG1
  30. {
  31. public:
  32. private:
  33. static std::auto_ptr<Fish_NormalOutFishCFG1> msSingleton;
  34. public:
  35. int GetCount();
  36. const Fish_NormalOutFishCFG1Data* GetData(int ID);
  37. boost::unordered_map<int, Fish_NormalOutFishCFG1Data>& GetMapData();
  38. void Reload();
  39. void Load(const std::string& path);
  40. void Load();
  41. static Fish_NormalOutFishCFG1* GetSingleton();
  42. private:
  43. boost::unordered_map<int, Fish_NormalOutFishCFG1Data> mMapData;
  44. };