123456789101112131415161718192021222324252627282930313233343536373839 |
- #pragma once
- #include <map>
- struct M_RoomRewardCFGData
- {
- //编号
- int mID;
- //玩法
- int mType;
- //需求id
- int mNeedItem;
- //需求数量
- int mNeedCount;
- //普通奖励ID
- std::vector<int> mRewardItems;
- //普通奖励数量
- std::vector<int> mRewardCount;
- //礼包奖励ID
- std::vector<int> mGiftRewardItems;
- //礼包奖励数量
- std::vector<int> mGiftRewardCount;
- };
- class M_RoomRewardCFG
- {
- public:
- private:
- static std::auto_ptr<M_RoomRewardCFG> msSingleton;
- public:
- int GetCount();
- const M_RoomRewardCFGData* GetData(int ID);
- const std::map<int, M_RoomRewardCFGData>& GetMapData();
- void Load();
- void LoadLua();
- void Reload();
- static M_RoomRewardCFG* GetSingleton();
- static void Release();
- private:
- std::map<int, M_RoomRewardCFGData> mMapData;
- };
|