#pragma once #include struct M_ItemCFGData { //道具ID int mItemId; //物品名称 std::string mItemName; //描述 std::string mItemDesc; //物品图标 std::string mIcon; //物品类型 int mItemCategory; //参数 std::vector mParameter; //钻石价值 int mDiamondValue; //道具价值 std::vector mItemValue; //金币价值 int mGoldValue; //特殊buff池是否则算金币 int mConvertedGold; //道具所属游戏 int mItemGame; //游戏道具 int mGameItem; //物品大图标 std::string mBigIcon; //道具功能 int mItemFun; //对应炮台ID int mTurretParam; //对应翅膀ID int mWingParam; //背包是否显示 int mDisplay; //分组 int mGroup; //转换碎片 int mDebris; //限时(秒) int mTimeLimit; //限时显示 int mTimeLimitDisplay; //使用CD int mTimeCD; //使用后马上移除 int mNeedRemove; //立即使用 int mImmediateUse; //用户拥有数量 int mPlayerLimit; //掉率(10000) int mDropRate; //掉落数量限制 int mDropLimit; //掉落限制炮率 int mNeedTurret; //掉落需要玩家等级 int mNeedLevel; //清零设置 int mResetSettings; //后台统计 int mRecord; }; class M_ItemCFG { public: private: static std::auto_ptr msSingleton; public: int GetCount(); const M_ItemCFGData* GetData(int ItemId); const std::map& GetMapData(); void Load(); void LoadLua(); void Reload(); static M_ItemCFG* GetSingleton(); static void Release(); private: std::map mMapData; };