M_fish_scheme.h 627 B

123456789101112131415161718192021222324252627282930313233
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct M_fish_schemeData
  5. {
  6. //ID
  7. int mID;
  8. //怪物ID
  9. int mmonster_id;
  10. //鱼阵方案组
  11. int mfish_group;
  12. //数量
  13. int mnum;
  14. //击杀次数
  15. std::vector<int> mkill_count;
  16. };
  17. class M_fish_scheme
  18. {
  19. public:
  20. private:
  21. static std::auto_ptr<M_fish_scheme> msSingleton;
  22. public:
  23. int GetCount();
  24. const M_fish_schemeData* GetData(int ID);
  25. boost::unordered_map<int, M_fish_schemeData>& GetMapData();
  26. void Reload();
  27. void Load(const std::string& path);
  28. void Load();
  29. static M_fish_scheme* GetSingleton();
  30. private:
  31. boost::unordered_map<int, M_fish_schemeData> mMapData;
  32. };