#pragma once
#include <map>
struct M_NoviceAchievementCFGData
{
	//任务ID
	int mID;
	//任务组
	int mGroup;
	//任务描述
	std::string mDes;
	//完成条件类型
	int mCompleteType;
	//特殊参数,填0不生效。对任务捕获指定鱼需要填写
	int mCompleteParam;
	//完成计数
	int mCompleteCount;
	//奖励物品ID
	std::vector<int> mAwardItemIDs;
	//奖励物品数量
	std::vector<int> mAwardItemCounts;
	//前往类型
	int mGoType;
	//搜索范围
	std::vector<int> mFindRand;
};

class M_NoviceAchievementCFG
{
public:
private:
	static std::auto_ptr<M_NoviceAchievementCFG> msSingleton;
public:
	int GetCount();
	const M_NoviceAchievementCFGData* GetData(int ID);
	const std::map<int, M_NoviceAchievementCFGData>& GetMapData();
	void Load();
	void LoadLua();
	void Reload();
	static M_NoviceAchievementCFG* GetSingleton();
	static void Release();
private:
	std::map<int, M_NoviceAchievementCFGData> mMapData;
};
