12345678910111213141516171819202122232425262728293031 |
- #pragma once
- #include <boost/unordered_map.hpp>
- #include <vector>
- struct M_WeekQuestRewardCFGData
- {
- //编号
- int mID;
- //所需积分
- int mNeedScore;
- //奖励物品ID
- std::vector<int> mRewardItem;
- //奖励物品数量
- std::vector<int> mRewardCount;
- };
- class M_WeekQuestRewardCFG
- {
- public:
- private:
- static std::auto_ptr<M_WeekQuestRewardCFG> msSingleton;
- public:
- int GetCount();
- const M_WeekQuestRewardCFGData* GetData(int ID);
- boost::unordered_map<int, M_WeekQuestRewardCFGData>& GetMapData();
- void Reload();
- void Load(const std::string& path);
- void Load();
- static M_WeekQuestRewardCFG* GetSingleton();
- private:
- boost::unordered_map<int, M_WeekQuestRewardCFGData> mMapData;
- };
|