12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- #pragma once
- #include <map>
- struct M_RoomQuestCFGData
- {
- //任务ID
- int mID;
- //任务类型
- int mGroup;
- //今日可完成次数
- int mQuantityCompleted;
- //名字
- std::string mName;
- //显示任务资源
- std::string mSourse;
- //完成条件类型
- int mCompleteType;
- //特殊参数,填0不生效。对任务捕获指定鱼需要填写
- int mCompleteParam;
- //完成计数
- int mCompleteCount;
- //可完成次数
- int mDailyCptCount;
- //奖励物品ID
- std::vector<int> mAwardItemIDs;
- //奖励物品数量
- std::vector<int> mAwardItemCounts;
- //前往类型
- int mGoType;
- //搜索范围
- std::vector<int> mFindRand;
- };
- class M_RoomQuestCFG
- {
- public:
- private:
- static std::auto_ptr<M_RoomQuestCFG> msSingleton;
- public:
- int GetCount();
- const M_RoomQuestCFGData* GetData(int ID);
- const std::map<int, M_RoomQuestCFGData>& GetMapData();
- void Load();
- void LoadLua();
- void Reload();
- static M_RoomQuestCFG* GetSingleton();
- static void Release();
- private:
- std::map<int, M_RoomQuestCFGData> mMapData;
- };
|