Fish_BuffCFG.h 789 B

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