123456789101112131415161718192021222324252627282930313233343536373839 |
- #pragma once
- #include <boost/unordered_map.hpp>
- #include <vector>
- struct Fish_JuKunEggCFGData
- {
- //编号
- int mID;
- //类型
- int mType;
- //最小分值
- int mMinimumScore;
- //最大分值
- int mMaximumScore;
- //随机最小鲲币(百分比)
- int mRandomMinimum;
- //随机最大币(百分比)
- int mRandomMaximum;
- //权重
- int mweight;
- //显示图片
- std::string mResource;
- };
- class Fish_JuKunEggCFG
- {
- public:
- private:
- static std::auto_ptr<Fish_JuKunEggCFG> msSingleton;
- public:
- int GetCount();
- const Fish_JuKunEggCFGData* GetData(int ID);
- boost::unordered_map<int, Fish_JuKunEggCFGData>& GetMapData();
- void Reload();
- void Load(const std::string& path);
- void Load();
- static Fish_JuKunEggCFG* GetSingleton();
- private:
- boost::unordered_map<int, Fish_JuKunEggCFGData> mMapData;
- };
|