M_ActivityFishingCeleExchangeCFG.h 990 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct M_ActivityFishingCeleExchangeCFGData
  5. {
  6. //编号
  7. int mID;
  8. //功能标签
  9. int mType;
  10. //需要道具
  11. int mNeedItem;
  12. //需要数量
  13. int mNeedCount;
  14. //折扣后数量
  15. int mDiscountCount;
  16. //道具ID
  17. int mItemId;
  18. //道具数量
  19. int mItemCount;
  20. //限兑次数
  21. int mLimit;
  22. //概率道具ID
  23. int mProbItem;
  24. //概率道具数量
  25. int mProbCount;
  26. //概率(百分比)
  27. int mProb;
  28. //礼包折扣(百分比)
  29. int mGiftDiscount;
  30. //阶限制
  31. int mLvLimit;
  32. };
  33. class M_ActivityFishingCeleExchangeCFG
  34. {
  35. public:
  36. private:
  37. static std::auto_ptr<M_ActivityFishingCeleExchangeCFG> msSingleton;
  38. public:
  39. int GetCount();
  40. const M_ActivityFishingCeleExchangeCFGData* GetData(int ID);
  41. boost::unordered_map<int, M_ActivityFishingCeleExchangeCFGData>& GetMapData();
  42. void Reload();
  43. void Load(const std::string& path);
  44. void Load();
  45. static M_ActivityFishingCeleExchangeCFG* GetSingleton();
  46. private:
  47. boost::unordered_map<int, M_ActivityFishingCeleExchangeCFGData> mMapData;
  48. };