#pragma once
#include <boost/unordered_map.hpp>
#include <vector>
struct Fish_TurretLevelCFGData
{
	//ID
	int mID;
	//开放倍率
	int mOpenRate;
	//奖励金币
	int mAwardGold;
	//单次升级
	int mOneTickUp;
	//升炮buff
	int mShotsBuff;
	//升级ICON
	std::string mLevelUpIcon;
	//升级类型(0普通, 1道具)
	int mUpType;
	//升级成功率(10000)
	int mUpRate;
	//需要幸运
	int mNeedLucky;
	//升级需要的物品ID
	std::vector<int> mNeedItems;
	//需要物品数量
	std::vector<int> mNeedCount;
	//额外升级所需
	std::vector<int> mExtraUpgrade;
	//掉落衰减
	int mDropAttenuates;
	//每日任务组
	std::vector<int> mDailyQuestGroup;
	//升级材料掉落上限（激光符文,浪花符文,火山符文,太阳符文）
	int mDropLimit;
	//炮倍任务奖励物品
	std::vector<int> mTaskItems;
	//炮倍任务奖励数量
	std::vector<int> mQuantityOfArticles;
	//炮倍任务显示
	int mTaskDisplay;
	//炮倍解锁id
	std::vector<int> mUnlockDisplayID;
	//炮倍解锁类型
	std::vector<int> mUnlockDisplayMasks;
};

class Fish_TurretLevelCFG
{
public:
private:
	static std::auto_ptr<Fish_TurretLevelCFG> msSingleton;
public:
	int GetCount();
	const Fish_TurretLevelCFGData* GetData(int ID);
	boost::unordered_map<int, Fish_TurretLevelCFGData>& GetMapData();
	void Reload();
	void Load(const std::string& path);
	void Load();
	static Fish_TurretLevelCFG* GetSingleton();
private:
	boost::unordered_map<int, Fish_TurretLevelCFGData> mMapData;
};
