#pragma once
#include <boost/unordered_map.hpp>
#include <vector>
struct M_DiamondPurchaseCFGData
{
	//编号
	int mID;
	//购买vip等级
	int mVipLevel;
	//钻石商品类型
	int mDiamondType;
	//任务内容
	std::string mTask;
	//上个礼包
	int mLastTime;
	//原价
	int mOriginalprice;
	//购买价格
	int mPurchasePrice;
	//奖励物品ID
	std::vector<int> mAwardItemIDs;
	//奖励物品数量
	std::vector<int> mAwardItemCounts;
	//购买次数
	int mCount;
};

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