M_ActiveReward.h 611 B

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include <map>
  3. struct M_ActiveRewardData
  4. {
  5. //编号
  6. int mID;
  7. //达成所需活跃度
  8. int mNeedActive;
  9. //没用
  10. std::string mName;
  11. //奖励物品ID
  12. int mItemId;
  13. //奖励物品数量
  14. int mCount;
  15. //图标
  16. std::string mIcon;
  17. };
  18. class M_ActiveReward
  19. {
  20. public:
  21. private:
  22. static std::auto_ptr<M_ActiveReward> msSingleton;
  23. public:
  24. int GetCount();
  25. const M_ActiveRewardData* GetData(int ID);
  26. const std::map<int, M_ActiveRewardData>& GetMapData();
  27. void Load();
  28. void LoadLua();
  29. void Reload();
  30. static M_ActiveReward* GetSingleton();
  31. static void Release();
  32. private:
  33. std::map<int, M_ActiveRewardData> mMapData;
  34. };