Fish_BuffCFG.h 841 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct Fish_BuffCFGData
  5. {
  6. //key
  7. int mID;
  8. //效果名字
  9. std::string mBuffName;
  10. //效果ICON
  11. std::string mBuffIcon;
  12. //效果类型1普通,2大招
  13. int mBuffType;
  14. //限时(秒)
  15. int mDuration;
  16. //vip限制
  17. int mNeedVIP;
  18. //对应子弹类型
  19. int mBulletType;
  20. //最大子弹数
  21. int mBulletCount;
  22. //参数
  23. std::vector<int> mParam;
  24. //提示图片
  25. std::string mGuideImage;
  26. //提示信息
  27. std::string mGuideInfo;
  28. };
  29. class Fish_BuffCFG
  30. {
  31. public:
  32. private:
  33. static std::auto_ptr<Fish_BuffCFG> msSingleton;
  34. public:
  35. int GetCount();
  36. const Fish_BuffCFGData* GetData(int ID);
  37. boost::unordered_map<int, Fish_BuffCFGData>& GetMapData();
  38. void Reload();
  39. void Load(const std::string& path);
  40. void Load();
  41. static Fish_BuffCFG* GetSingleton();
  42. private:
  43. boost::unordered_map<int, Fish_BuffCFGData> mMapData;
  44. };