M_ActivitySmashEggRewardCFG.h 659 B

123456789101112131415161718192021222324252627282930313233
  1. #pragma once
  2. #include <map>
  3. struct M_ActivitySmashEggRewardCFGData
  4. {
  5. //编号
  6. int mID;
  7. //砸蛋类型
  8. int mEggType;
  9. //奖励ID
  10. int mRewardId;
  11. //奖励数量
  12. int mRewardCount;
  13. //权重
  14. int mWeight;
  15. };
  16. class M_ActivitySmashEggRewardCFG
  17. {
  18. public:
  19. private:
  20. static std::auto_ptr<M_ActivitySmashEggRewardCFG> msSingleton;
  21. public:
  22. int GetCount();
  23. const M_ActivitySmashEggRewardCFGData* GetData(int ID);
  24. const std::map<int, M_ActivitySmashEggRewardCFGData>& GetMapData();
  25. void Load();
  26. void LoadLua();
  27. void Reload();
  28. static M_ActivitySmashEggRewardCFG* GetSingleton();
  29. static void Release();
  30. private:
  31. std::map<int, M_ActivitySmashEggRewardCFGData> mMapData;
  32. };