12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- #pragma once
- #include <boost/unordered_map.hpp>
- #include <vector>
- struct Fish_FreeLotteryCFGData
- {
- //key
- int mID;
- //说明
- std::string mInfo;
- //最小奖池
- int mBaseGold;
- //可抽彩券价值
- int mLotteryValue;
- //奖励物品1
- std::vector<std::string> mAwardItem1;
- //奖励物品2
- std::vector<std::string> mAwardItem2;
- //奖励物品3
- std::vector<std::string> mAwardItem3;
- //奖励物品4
- std::vector<std::string> mAwardItem4;
- //奖励物品5
- std::vector<std::string> mAwardItem5;
- //奖励物品6
- std::vector<std::string> mAwardItem6;
- };
- class Fish_FreeLotteryCFG
- {
- public:
- private:
- static std::auto_ptr<Fish_FreeLotteryCFG> msSingleton;
- public:
- int GetCount();
- const Fish_FreeLotteryCFGData* GetData(int ID);
- boost::unordered_map<int, Fish_FreeLotteryCFGData>& GetMapData();
- void Reload();
- void Load(const std::string& path);
- void Load();
- static Fish_FreeLotteryCFG* GetSingleton();
- private:
- boost::unordered_map<int, Fish_FreeLotteryCFGData> mMapData;
- };
|