#pragma once #include #include //消耗 //激活 typedef struct tagRefiningCfg{ int nId; std::vector cost; int nRefineId; tagRefiningCfg() { nId = 0; nRefineId = 0; cost.clear(); } }RefiningCfg; typedef struct tagReplaceCfg{ int nId; int nPrice; int nItemId; tagReplaceCfg() { memset(this, 0, sizeof(*this)); } }ReplaceCfg; class CRefiningCfg :public CLuaConfigBase { public: typedef CLuaConfigBase Inherited; typedef CObjectAllocator CDataAllocator; CRefiningCfg(); ~CRefiningCfg(); bool LoadConfig(LPCTSTR sFilePath); //通过祝福油获取最大等级 bool ReadAllConfig(); RefiningCfg* getRefiningCfg(int nId); ReplaceCfg* getReplaceCfg(int nItemId) { std::map::iterator it = m_nReplaces.find(nItemId); if(it != m_nReplaces.end()) { return &(it->second); } return NULL; } void GetRefineAttribute(int type, DROPGOODS& item); public: int nVoucher2; //元宝兑换单个祖玛凭证价格 int nRefininglevel; //洗炼页签开放等级 int nVoucher1; //元宝兑换单个沃玛凭证价格 int nMaterialprice; //元宝兑换单个洗炼石价格 std::map m_nReiningCfgs; std::map m_nReplaces; std::map m_RefingAttributeMaps; //洗炼属性 CDataAllocator m_DataAllocator; };