M_DragonBallLottery.h 593 B

123456789101112131415161718192021222324252627282930313233
  1. #pragma once
  2. #include <map>
  3. struct M_DragonBallLotteryData
  4. {
  5. //ID
  6. int mID;
  7. //权重
  8. int mWeight;
  9. //道具ID
  10. int mItemID;
  11. //道具数量
  12. int mItemCount;
  13. //大奖标识
  14. int mBig;
  15. };
  16. class M_DragonBallLottery
  17. {
  18. public:
  19. private:
  20. static std::auto_ptr<M_DragonBallLottery> msSingleton;
  21. public:
  22. int GetCount();
  23. const M_DragonBallLotteryData* GetData(int ID);
  24. const std::map<int, M_DragonBallLotteryData>& GetMapData();
  25. void Load();
  26. void LoadLua();
  27. void Reload();
  28. static M_DragonBallLottery* GetSingleton();
  29. static void Release();
  30. private:
  31. std::map<int, M_DragonBallLotteryData> mMapData;
  32. };