Fish_PirateOutFishCFG.h 782 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct Fish_PirateOutFishCFGData
  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. //分组
  21. int mGroupID;
  22. //分组最大鱼数
  23. int mGroupMaxFish;
  24. };
  25. class Fish_PirateOutFishCFG
  26. {
  27. public:
  28. private:
  29. static std::auto_ptr<Fish_PirateOutFishCFG> msSingleton;
  30. public:
  31. int GetCount();
  32. const Fish_PirateOutFishCFGData* GetData(int ID);
  33. boost::unordered_map<int, Fish_PirateOutFishCFGData>& GetMapData();
  34. void Reload();
  35. void Load(const std::string& path);
  36. void Load();
  37. static Fish_PirateOutFishCFG* GetSingleton();
  38. private:
  39. boost::unordered_map<int, Fish_PirateOutFishCFGData> mMapData;
  40. };