12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- #pragma once
- #include <boost/unordered_map.hpp>
- #include <vector>
- struct M_WeekQuestCFGData
- {
- //任务ID
- int mID;
- //任务组
- int mGroup;
- //炮倍解锁
- std::vector<int> mCannonFold;
- //名字
- std::string mName;
- //完成条件类型
- int mCompleteType;
- //特殊参数,填0不生效。对任务捕获指定鱼需要填写
- int mCompleteParam;
- //完成计数
- int mCompleteCount;
- //达到天数
- int mDays;
- //奖励物品ID
- std::vector<int> mAwardItemIDs;
- //奖励物品数量
- std::vector<int> mAwardItemCounts;
- //前往类型
- int mGoType;
- //搜索范围
- std::vector<int> mFindRand;
- //转化类型
- int mShowChangeType;
- };
- class M_WeekQuestCFG
- {
- public:
- private:
- static std::auto_ptr<M_WeekQuestCFG> msSingleton;
- public:
- int GetCount();
- const M_WeekQuestCFGData* GetData(int ID);
- boost::unordered_map<int, M_WeekQuestCFGData>& GetMapData();
- void Reload();
- void Load(const std::string& path);
- void Load();
- static M_WeekQuestCFG* GetSingleton();
- private:
- boost::unordered_map<int, M_WeekQuestCFGData> mMapData;
- };
|