Fish_FishRankCFG.h 952 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct Fish_FishRankCFGData
  5. {
  6. //编号
  7. int mID;
  8. //段位名称
  9. std::string mRankName;
  10. //所需积分
  11. std::string mIntegral;
  12. //星级1
  13. std::string mStars1;
  14. //星级2
  15. std::string mStars2;
  16. //星级3
  17. std::string mStars3;
  18. //段位奖励
  19. std::vector<int> mRankRewardId;
  20. //段位奖励数量
  21. std::vector<int> mRankRewardCount;
  22. //海神奖励
  23. std::vector<int> mSeaGodRewardId;
  24. //海神奖励数量
  25. std::vector<int> mSeaGodRewardCount;
  26. //礼包ID
  27. int mGiftId;
  28. //段位资源
  29. std::string mResources;
  30. };
  31. class Fish_FishRankCFG
  32. {
  33. public:
  34. private:
  35. static std::auto_ptr<Fish_FishRankCFG> msSingleton;
  36. public:
  37. int GetCount();
  38. const Fish_FishRankCFGData* GetData(int ID);
  39. boost::unordered_map<int, Fish_FishRankCFGData>& GetMapData();
  40. void Reload();
  41. void Load(const std::string& path);
  42. void Load();
  43. static Fish_FishRankCFG* GetSingleton();
  44. private:
  45. boost::unordered_map<int, Fish_FishRankCFGData> mMapData;
  46. };