M_ActivityDrawLottery.h 637 B

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include <map>
  3. struct M_ActivityDrawLotteryData
  4. {
  5. //编号
  6. int mID;
  7. //抽奖类型
  8. int mDrawType;
  9. //奖励
  10. int mItemId;
  11. //数量
  12. int mNumber;
  13. //权重
  14. int mWeight;
  15. //显示标签
  16. int mDisplayLabel;
  17. };
  18. class M_ActivityDrawLottery
  19. {
  20. public:
  21. private:
  22. static std::auto_ptr<M_ActivityDrawLottery> msSingleton;
  23. public:
  24. int GetCount();
  25. const M_ActivityDrawLotteryData* GetData(int ID);
  26. const std::map<int, M_ActivityDrawLotteryData>& GetMapData();
  27. void Load();
  28. void LoadLua();
  29. void Reload();
  30. static M_ActivityDrawLottery* GetSingleton();
  31. static void Release();
  32. private:
  33. std::map<int, M_ActivityDrawLotteryData> mMapData;
  34. };