1234567891011121314151617181920212223242526272829303132333435 |
- #pragma once
- #include <boost/unordered_map.hpp>
- #include <vector>
- struct M_ActivityDrawLotteryData
- {
- //编号
- int mID;
- //抽奖类型
- int mDrawType;
- //奖励
- int mItemId;
- //数量
- int mNumber;
- //权重
- int mWeight;
- //显示标签
- int mDisplayLabel;
- };
- class M_ActivityDrawLottery
- {
- public:
- private:
- static std::auto_ptr<M_ActivityDrawLottery> msSingleton;
- public:
- int GetCount();
- const M_ActivityDrawLotteryData* GetData(int ID);
- boost::unordered_map<int, M_ActivityDrawLotteryData>& GetMapData();
- void Reload();
- void Load(const std::string& path);
- void Load();
- static M_ActivityDrawLottery* GetSingleton();
- private:
- boost::unordered_map<int, M_ActivityDrawLotteryData> mMapData;
- };
|