#pragma once
#include <map>
struct M_RechangeCFGData
{
	//充值ID
	int mID;
	//名字
	std::string mName;
	//描述
	std::string mDesc;
	//所属活动
	int mActivityId;
	//ICON
	std::string mIcon;
	//开始时间
	std::string mStartTime;
	//结束时间 
	std::string mEndTime;
	//礼包组
	int mGroup;
	//炮倍等级
	std::vector<int> mneedlevel;
	//VIP限制
	int mNeedVIP;
	//类型（1.购买金币2.购买钻石 3.月卡4.礼包5.炮6.限时礼包7.触发礼包8.每日礼包9.周卡10.VIP限购礼包11.每日寻宝12.翅膀
	int mType;
	//价格
	int mPrice;
	//钻石价格
	int mDiamondPrice;
	//需要等级
	int mNeedLevel;
	//首次送金币
	int mFirstGold;
	//首次送钻石
	int mFirstTicket;
	//增加vip经验
	int mVIPExp;
	//显示序号
	int mIndex;
	//上个礼包
	int mLastGift;
	//下个礼包
	int mNextGift;
	//显示商店
	int mShopType;
	//累计充值
	int mCumulativeRecharge;
	//物品ID
	std::vector<int> mItemID;
	//物品数量
	std::vector<int> mItemCount;
	//购买次数
	int mCount;
	//每日礼包
	int mDailyGiftPackage;
	//限时(秒)
	int mTimeLimit;
	//限时类型
	int mCategory;
	//BuffID
	int mBuffID;
	//返利值（前端显示）
	int mRebateValue;
	//角标显示 0-不显示 1-推荐
	int mHotIcon;
	//礼包概率奖励
	std::vector<float> mPackageProbability;
	//原价
	int mOriginalprice;
	//加赠金币原价
	int mGOLDOriginalprice;
	//加赠钻石原价
	int mDiamondsOriginalprice;
	//赠送上限
	int mGiftCeiling;
	//赠送下限
	int mLowerGiftLimit;
	//最高可获得
	int mHighestGain;
	//Tips显示
	int mTipsDisplay;
};

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