123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- #pragma once
- #include <boost/unordered_map.hpp>
- #include <vector>
- struct M_GiftRewardCFGData
- {
- //奖励类型
- int mRewardType;
- //开始时间
- std::string mStartTime;
- //结束时间
- std::string mEndTime;
- //道具ID
- std::vector<int> mItemId;
- //数量
- std::vector<int> mItemCount;
- //首次购买
- std::vector<int> mItemId2;
- //立即赠送
- std::vector<int> mItemId3;
- //现价
- int mPrice;
- //总价
- std::vector<int> mTotalPrice;
- //需要vip等级
- int mVipLevel;
- //礼包id
- int mGiftId;
- };
- class M_GiftRewardCFG
- {
- public:
- private:
- static std::auto_ptr<M_GiftRewardCFG> msSingleton;
- public:
- int GetCount();
- const M_GiftRewardCFGData* GetData(int RewardType);
- boost::unordered_map<int, M_GiftRewardCFGData>& GetMapData();
- void Reload();
- void Load(const std::string& path);
- void Load();
- static M_GiftRewardCFG* GetSingleton();
- private:
- boost::unordered_map<int, M_GiftRewardCFGData> mMapData;
- };
|