Fish_LuckyDrawCFG.h 729 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #pragma once
  2. #include <map>
  3. struct Fish_LuckyDrawCFGData
  4. {
  5. //索引
  6. int mIndex;
  7. //价值校验值
  8. std::vector<int> mPinValue;
  9. //类型
  10. int mStarLvl;
  11. //物品类型
  12. int mItemType;
  13. //物品数量
  14. int mItemCount;
  15. //道具价值
  16. int mItemValue;
  17. //普通概率
  18. std::vector<int> mNormalProb;
  19. //无彩券概率
  20. std::vector<int> mNoChipProb;
  21. };
  22. class Fish_LuckyDrawCFG
  23. {
  24. public:
  25. private:
  26. static std::auto_ptr<Fish_LuckyDrawCFG> msSingleton;
  27. public:
  28. int GetCount();
  29. const Fish_LuckyDrawCFGData* GetData(int Index);
  30. const std::map<int, Fish_LuckyDrawCFGData>& GetMapData();
  31. void Load();
  32. void LoadLua();
  33. void Reload();
  34. static Fish_LuckyDrawCFG* GetSingleton();
  35. static void Release();
  36. private:
  37. std::map<int, Fish_LuckyDrawCFGData> mMapData;
  38. };