M_RoomRewardCFG.h 740 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #pragma once
  2. #include <map>
  3. struct M_RoomRewardCFGData
  4. {
  5. //编号
  6. int mID;
  7. //玩法
  8. int mType;
  9. //需求id
  10. int mNeedItem;
  11. //需求数量
  12. int mNeedCount;
  13. //普通奖励ID
  14. std::vector<int> mRewardItems;
  15. //普通奖励数量
  16. std::vector<int> mRewardCount;
  17. //礼包奖励ID
  18. std::vector<int> mGiftRewardItems;
  19. //礼包奖励数量
  20. std::vector<int> mGiftRewardCount;
  21. };
  22. class M_RoomRewardCFG
  23. {
  24. public:
  25. private:
  26. static std::auto_ptr<M_RoomRewardCFG> msSingleton;
  27. public:
  28. int GetCount();
  29. const M_RoomRewardCFGData* GetData(int ID);
  30. const std::map<int, M_RoomRewardCFGData>& GetMapData();
  31. void Load();
  32. void LoadLua();
  33. void Reload();
  34. static M_RoomRewardCFG* GetSingleton();
  35. static void Release();
  36. private:
  37. std::map<int, M_RoomRewardCFGData> mMapData;
  38. };