M_ActivityDoubleElevenLottery.h 792 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct M_ActivityDoubleElevenLotteryData
  5. {
  6. //ID
  7. int mID;
  8. //权重
  9. int mWeight;
  10. //道具ID
  11. int mItemID;
  12. //ICON
  13. std::string mIcon;
  14. //道具数量
  15. int mItemCount;
  16. //实际大奖权重
  17. int mPrixWeight;
  18. //大奖标识
  19. int mPrixIdentification;
  20. };
  21. class M_ActivityDoubleElevenLottery
  22. {
  23. public:
  24. private:
  25. static std::auto_ptr<M_ActivityDoubleElevenLottery> msSingleton;
  26. public:
  27. int GetCount();
  28. const M_ActivityDoubleElevenLotteryData* GetData(int ID);
  29. boost::unordered_map<int, M_ActivityDoubleElevenLotteryData>& GetMapData();
  30. void Reload();
  31. void Load(const std::string& path);
  32. void Load();
  33. static M_ActivityDoubleElevenLottery* GetSingleton();
  34. private:
  35. boost::unordered_map<int, M_ActivityDoubleElevenLotteryData> mMapData;
  36. };