M_DialLotteryCFG.h 847 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct M_DialLotteryCFGData
  5. {
  6. //编号
  7. int mID;
  8. //奖励金币
  9. int mRewardCoin;
  10. //奖励类型(M_item ID)
  11. int mRewardType;
  12. //图标缩放比例
  13. float mScale;
  14. //物品ICON
  15. std::string mIcon;
  16. //第一次转转盘
  17. int mFirstProb;
  18. //身上没钱
  19. int mNoMoneyProb;
  20. //7天内有钱
  21. int mLess7DaysProb;
  22. //7天后可抽话费券
  23. int mCanGetChipProb;
  24. //7天后不可抽话费券
  25. int mCannotGetChipProb;
  26. };
  27. class M_DialLotteryCFG
  28. {
  29. public:
  30. private:
  31. static std::auto_ptr<M_DialLotteryCFG> msSingleton;
  32. public:
  33. int GetCount();
  34. const M_DialLotteryCFGData* GetData(int ID);
  35. boost::unordered_map<int, M_DialLotteryCFGData>& GetMapData();
  36. void Reload();
  37. void Load(const std::string& path);
  38. void Load();
  39. static M_DialLotteryCFG* GetSingleton();
  40. private:
  41. boost::unordered_map<int, M_DialLotteryCFGData> mMapData;
  42. };