M_DropCFG.h 615 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #pragma once
  2. #include <map>
  3. struct M_DropCFGData
  4. {
  5. //ID
  6. int mID;
  7. //掉落类型
  8. int mType;
  9. //掉落组
  10. std::vector<int> mdropInfo;
  11. //开始炮倍
  12. int mstarRate;
  13. //结束炮倍
  14. int mEndRate;
  15. //随机数量
  16. std::vector<int> mDropCount;
  17. //其他类型
  18. int mOtherTypes;
  19. };
  20. class M_DropCFG
  21. {
  22. public:
  23. private:
  24. static std::auto_ptr<M_DropCFG> msSingleton;
  25. public:
  26. int GetCount();
  27. const M_DropCFGData* GetData(int ID);
  28. const std::map<int, M_DropCFGData>& GetMapData();
  29. void Load();
  30. void LoadLua();
  31. void Reload();
  32. static M_DropCFG* GetSingleton();
  33. static void Release();
  34. private:
  35. std::map<int, M_DropCFGData> mMapData;
  36. };