Fish_FieldParameter.h 714 B

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct Fish_FieldParameterData
  5. {
  6. //ID
  7. int mID;
  8. //房间号
  9. int mRoomId;
  10. //BUFF类型
  11. int mBuffType;
  12. //奖罚人数(百分比)
  13. int mNumber;
  14. //偏差(百分比)
  15. int mRateOfReturn;
  16. //命中调整(百分比)
  17. int mProbability;
  18. };
  19. class Fish_FieldParameter
  20. {
  21. public:
  22. private:
  23. static std::auto_ptr<Fish_FieldParameter> msSingleton;
  24. public:
  25. int GetCount();
  26. const Fish_FieldParameterData* GetData(int ID);
  27. boost::unordered_map<int, Fish_FieldParameterData>& GetMapData();
  28. void Reload();
  29. void Load(const std::string& path);
  30. void Load();
  31. static Fish_FieldParameter* GetSingleton();
  32. private:
  33. boost::unordered_map<int, Fish_FieldParameterData> mMapData;
  34. };