1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #pragma once
- #include <boost/unordered_map.hpp>
- #include <vector>
- struct Fish_SquamaExchangeCFGData
- {
- //ID
- int mID;
- //价格
- int mPrice;
- //折扣礼包, 对应M_RechangeCFG中的id
- std::vector<int> mDiscountGift;
- //折扣价格
- std::vector<int> mSalePrice;
- //最终折扣价格
- int mFinalPrice;
- //奖励道具,填M_ItemCFG中的道具ID
- std::vector<int> mRewardList;
- //道具数量
- std::vector<int> mRewardCount;
- //获取奖励概率
- std::vector<int> mRate;
- //黄金图标
- std::string mGoldIcon;
- };
- class Fish_SquamaExchangeCFG
- {
- public:
- private:
- static std::auto_ptr<Fish_SquamaExchangeCFG> msSingleton;
- public:
- int GetCount();
- const Fish_SquamaExchangeCFGData* GetData(int ID);
- boost::unordered_map<int, Fish_SquamaExchangeCFGData>& GetMapData();
- void Reload();
- void Load(const std::string& path);
- void Load();
- static Fish_SquamaExchangeCFG* GetSingleton();
- private:
- boost::unordered_map<int, Fish_SquamaExchangeCFGData> mMapData;
- };
|