#pragma once
#include <map>
struct M_GiftGuideCFGData
{
	//ID
	int mID;
	//名字
	std::string mName;
	//需要等级
	int mNeedLevel;
	//类型(3VIP礼包特殊处理)4首充礼包 5材料礼包 6每周欢乐购、
	int mType;
	//充值ID
	int mRechangeID;
	//持续时间
	int mContinueTime;
	//奖励物品
	std::vector<int> mAwardItem;
	//参数
	int mParam;
	//抬头资源
	std::string mTitleImage;
	//左边资源
	std::string mLeftImage;
	//RMB资源
	std::string mRMBImage;
	//钻石价格,材料礼包用钻石买
	std::vector<int> mGemPrice;
	//开始时间
	std::string mStartTime;
	//结束时间
	std::string mEndTime;
	//礼包周几刷新 0不考虑
	int mRefreshWeekDay;
	//活动期间内可购买次数
	int mBuyCount;
};

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