M_un_lock_battle.h 822 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct M_un_lock_battleData
  5. {
  6. //ID
  7. int64_t mID;
  8. //场地类型
  9. int mbattle_type;
  10. //魔法阵解锁
  11. int mun_lock_magic;
  12. //魔币准入金额
  13. int mdemand;
  14. //魔币禁止金额
  15. int mprohibit;
  16. //魔法阵使用等级
  17. std::vector<int> muse_magic;
  18. //鱼阵波数
  19. std::vector<int> mfish_wave;
  20. //鱼阵方案(方案,权重|方案,权重)
  21. std::string mfish_scheme;
  22. };
  23. class M_un_lock_battle
  24. {
  25. public:
  26. private:
  27. static std::auto_ptr<M_un_lock_battle> msSingleton;
  28. public:
  29. int GetCount();
  30. const M_un_lock_battleData* GetData(int64_t ID);
  31. boost::unordered_map<int64_t, M_un_lock_battleData>& GetMapData();
  32. void Reload();
  33. void Load(const std::string& path);
  34. void Load();
  35. static M_un_lock_battle* GetSingleton();
  36. private:
  37. boost::unordered_map<int64_t, M_un_lock_battleData> mMapData;
  38. };