1234567891011121314151617181920212223242526272829303132333435 |
- #pragma once
- #include <boost/unordered_map.hpp>
- #include <vector>
- struct Fish_FieldParameterData
- {
- //ID
- int mID;
- //房间号
- int mRoomId;
- //BUFF类型
- int mBuffType;
- //奖罚人数(百分比)
- int mNumber;
- //偏差(百分比)
- int mRateOfReturn;
- //命中调整(百分比)
- int mProbability;
- };
- class Fish_FieldParameter
- {
- public:
- private:
- static std::auto_ptr<Fish_FieldParameter> msSingleton;
- public:
- int GetCount();
- const Fish_FieldParameterData* GetData(int ID);
- boost::unordered_map<int, Fish_FieldParameterData>& GetMapData();
- void Reload();
- void Load(const std::string& path);
- void Load();
- static Fish_FieldParameter* GetSingleton();
- private:
- boost::unordered_map<int, Fish_FieldParameterData> mMapData;
- };
|