Fish_FishChuBaoCFG.h 775 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct Fish_FishChuBaoCFGData
  5. {
  6. //编号
  7. int mID;
  8. //鱼ID
  9. int mFishId;
  10. //最小炮倍
  11. int mTurretMin;
  12. //最大炮倍
  13. int mTurretMax;
  14. //分值
  15. int mScore;
  16. //权重
  17. int mWeight;
  18. //金币(百分比)
  19. int mGold;
  20. //特定奖励
  21. std::vector<int> mGivenReward;
  22. //档位名称
  23. std::string mGearName;
  24. };
  25. class Fish_FishChuBaoCFG
  26. {
  27. public:
  28. private:
  29. static std::auto_ptr<Fish_FishChuBaoCFG> msSingleton;
  30. public:
  31. int GetCount();
  32. const Fish_FishChuBaoCFGData* GetData(int ID);
  33. boost::unordered_map<int, Fish_FishChuBaoCFGData>& GetMapData();
  34. void Reload();
  35. void Load(const std::string& path);
  36. void Load();
  37. static Fish_FishChuBaoCFG* GetSingleton();
  38. private:
  39. boost::unordered_map<int, Fish_FishChuBaoCFGData> mMapData;
  40. };