Fish_TorpedoRankRewardCFG.h 811 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct Fish_TorpedoRankRewardCFGData
  5. {
  6. //ID
  7. int mID;
  8. //排行类型
  9. int mRankType;
  10. //鱼雷ID
  11. int mTorpedoId;
  12. //开始排名
  13. int mStartRank;
  14. //结束排名
  15. int mEndRank;
  16. //奖励道具列表
  17. std::vector<int> mRewardList;
  18. //奖励数量
  19. std::vector<int> mRewardCount;
  20. //类型
  21. int mType;
  22. };
  23. class Fish_TorpedoRankRewardCFG
  24. {
  25. public:
  26. private:
  27. static std::auto_ptr<Fish_TorpedoRankRewardCFG> msSingleton;
  28. public:
  29. int GetCount();
  30. const Fish_TorpedoRankRewardCFGData* GetData(int ID);
  31. boost::unordered_map<int, Fish_TorpedoRankRewardCFGData>& GetMapData();
  32. void Reload();
  33. void Load(const std::string& path);
  34. void Load();
  35. static Fish_TorpedoRankRewardCFG* GetSingleton();
  36. private:
  37. boost::unordered_map<int, Fish_TorpedoRankRewardCFGData> mMapData;
  38. };