1234567891011121314151617181920212223242526272829303132333435 |
- #pragma once
- #include <boost/unordered_map.hpp>
- #include <vector>
- struct M_ActivityLeiChongCFGData
- {
- //编号
- int mID;
- //描述
- std::string mDsc;
- //完成条件类型
- int mCompleteType;
- //完成计数
- int mCompleteCount;
- //奖励物品ID
- std::vector<int> mAwardItemIDs;
- //奖励物品数量
- std::vector<int> mAwardItemCounts;
- };
- class M_ActivityLeiChongCFG
- {
- public:
- private:
- static std::auto_ptr<M_ActivityLeiChongCFG> msSingleton;
- public:
- int GetCount();
- const M_ActivityLeiChongCFGData* GetData(int ID);
- boost::unordered_map<int, M_ActivityLeiChongCFGData>& GetMapData();
- void Reload();
- void Load(const std::string& path);
- void Load();
- static M_ActivityLeiChongCFG* GetSingleton();
- private:
- boost::unordered_map<int, M_ActivityLeiChongCFGData> mMapData;
- };
|