Fish_IntermediateExchange.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct Fish_IntermediateExchangeData
  5. {
  6. //编号
  7. int mID;
  8. //鱼名
  9. std::string mname;
  10. //道具
  11. std::vector<int> mitemId;
  12. //数量
  13. std::vector<int> mitemcount;
  14. //基础奖励
  15. std::vector<int> mfixedReward;
  16. //概率奖励
  17. std::vector<int> mprobabilityReward;
  18. //福袋奖励
  19. std::vector<int> mprimaryFubao;
  20. //新手礼包积分
  21. std::vector<int> mNewGiftIntegral;
  22. //新手积分
  23. std::vector<int> mNewIntegral;
  24. //礼包积分
  25. std::vector<int> mGiftIntegral;
  26. //消耗权重
  27. std::vector<int> mComIntegral;
  28. //普通积分
  29. std::vector<int> mNorIntegral;
  30. //不上榜权重
  31. std::vector<int> mOnListWeight;
  32. };
  33. class Fish_IntermediateExchange
  34. {
  35. public:
  36. private:
  37. static std::auto_ptr<Fish_IntermediateExchange> msSingleton;
  38. public:
  39. int GetCount();
  40. const Fish_IntermediateExchangeData* GetData(int ID);
  41. boost::unordered_map<int, Fish_IntermediateExchangeData>& GetMapData();
  42. void Reload();
  43. void Load(const std::string& path);
  44. void Load();
  45. static Fish_IntermediateExchange* GetSingleton();
  46. private:
  47. boost::unordered_map<int, Fish_IntermediateExchangeData> mMapData;
  48. };