#pragma once
#include <boost/unordered_map.hpp>
#include <vector>
struct M_shopData
{
	//ID
	int mID;
	//类型
	int mshop_type;
	//购买消耗
	std::vector<int> mcost_Item;
	//购买获得
	std::vector<int> mreward;
	//图标
	std::string micon;
	//排序
	int msort;
	//开启条件(VIP等级)
	int mcondition;
	//超值角标
	std::string mvalue;
};

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