#pragma once
#include <boost/unordered_map.hpp>
#include <vector>
struct Fish_TurretSetCFGData
{
	//ID
	int mID;
	//套装ID
	int mSetID;
	//炮台套装
	std::string mName;
	//最低倍率
	int mMinRate;
	//最大倍率
	int mMaxRate;
	//品级
	int mGrade;
	//Vip等级解锁
	int mVipClear;
	//Vip等级获取
	int mVipGet;
	//物品ID
	std::vector<int> mItemID;
	//效果类型
	std::vector<int> mEffectType;
	//随机属性
	std::vector<int> mRandomEffect;
	//炮台
	int mTurretID;
	//射速
	int mVelocity;
	//普通鱼命中
	int mLockingPower;
	//Boss鱼命中
	int mRagePower;
	//子弹
	int mSelfBulletID;
	//子弹
	int mOtherBulletID;
	//大招子弹
	int mPowerBulletID;
	//增加金额
	int mAddRate;
	//最大能量
	int mMaxPower;
	//大招效果
	int mPowerBuff;
	//发炮间隔(毫秒)
	int mFireSpeed;
	//道具使用期间发炮间隔(毫秒)
	std::vector<int> mFireItemSpeed;
	//获取路径
	int mRoute;
	//最高等级
	int mTopLevel;
	//升级所需道具ID
	int mLvUpItem;
	//升级所需道具数量
	int mLvUpCount;
	//重置返还数量
	std::vector<int> mResetReturnCount;
	//炮台强化等级
	std::vector<int> mBatteryLv;
	//对应炮倍技能ID
	std::vector<int> mMultipleUpper;
	//升级加成
	std::vector<int> mAddValue;
};

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