#pragma once #include #include struct M_ActivityKingCraftExchangeData { //ID int mID; //兑换类型 int mType; //需要兑换道具ID int mNeedItem; //需要兑换道具数量 int mNeedCount; //道具ID int mItemID; //道具数量 int mItemCount; //次数限制 int mLimit; }; class M_ActivityKingCraftExchange { public: private: static std::auto_ptr msSingleton; public: int GetCount(); const M_ActivityKingCraftExchangeData* GetData(int ID); boost::unordered_map& GetMapData(); void Reload(); void Load(const std::string& path); void Load(); static M_ActivityKingCraftExchange* GetSingleton(); private: boost::unordered_map mMapData; };