12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- #pragma once
- #include <boost/unordered_map.hpp>
- #include <vector>
- struct Fish_ShopCFGData
- {
- //key
- int mShopID;
- //物品id
- int mItemID;
- //数量
- int mItemCount;
- //消耗类型(1金币,2礼券,3月卡炮)
- int mConsumeType;
- //背包类型(1道具,2装备,3鱼雷,4鱼雷碎片,5灵珠,6宝箱)
- int mKnapsackType;
- //消耗数量
- int mConsumeCount;
- //是否开放
- std::vector<int> mShowType;
- //合成id
- int mSynthesisId;
- //是否支持VIP打折(0不打折)
- int mNeedVIP;
- //商店页面显示(0-vip,1-特惠,2-背包)
- int mShopTab;
- //能否发布
- int mRelease;
- //发布VIP等级
- int mReleaseVIP;
- //炮台id
- int mTurrestId;
- };
- class Fish_ShopCFG
- {
- public:
- private:
- static std::auto_ptr<Fish_ShopCFG> msSingleton;
- public:
- int GetCount();
- const Fish_ShopCFGData* GetData(int ShopID);
- boost::unordered_map<int, Fish_ShopCFGData>& GetMapData();
- void Reload();
- void Load(const std::string& path);
- void Load();
- static Fish_ShopCFG* GetSingleton();
- private:
- boost::unordered_map<int, Fish_ShopCFGData> mMapData;
- };
|