1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- #pragma once
- #include <boost/unordered_map.hpp>
- #include <vector>
- struct Fish_FishRankCFGData
- {
- //编号
- int mID;
- //段位名称
- std::string mRankName;
- //所需积分
- std::string mIntegral;
- //星级1
- std::string mStars1;
- //星级2
- std::string mStars2;
- //星级3
- std::string mStars3;
- //段位奖励
- std::vector<int> mRankRewardId;
- //段位奖励数量
- std::vector<int> mRankRewardCount;
- //海神奖励
- std::vector<int> mSeaGodRewardId;
- //海神奖励数量
- std::vector<int> mSeaGodRewardCount;
- //礼包ID
- int mGiftId;
- //段位资源
- std::string mResources;
- };
- class Fish_FishRankCFG
- {
- public:
- private:
- static std::auto_ptr<Fish_FishRankCFG> msSingleton;
- public:
- int GetCount();
- const Fish_FishRankCFGData* GetData(int ID);
- boost::unordered_map<int, Fish_FishRankCFGData>& GetMapData();
- void Reload();
- void Load(const std::string& path);
- void Load();
- static Fish_FishRankCFG* GetSingleton();
- private:
- boost::unordered_map<int, Fish_FishRankCFGData> mMapData;
- };
|