1234567891011121314151617181920212223242526272829 |
- #pragma once
- #include <boost/unordered_map.hpp>
- #include <vector>
- struct Fish_GiftCFGData
- {
- //ÅŲ́ÀàÐÍ
- int mTurret;
- //ÎïÆ·ID
- int mItemID;
- //ÎïÆ·ÊýÁ¿
- int mItemCount;
- };
- class Fish_GiftCFG
- {
- public:
- private:
- static std::auto_ptr<Fish_GiftCFG> msSingleton;
- public:
- int GetCount();
- const Fish_GiftCFGData* GetData(int Turret);
- boost::unordered_map<int, Fish_GiftCFGData>& GetMapData();
- void Reload();
- void Load(const std::string& path);
- void Load();
- static Fish_GiftCFG* GetSingleton();
- private:
- boost::unordered_map<int, Fish_GiftCFGData> mMapData;
- };
|