M_RobotNameCFG.h 787 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct M_RobotNameCFGData
  5. {
  6. //索引
  7. int mindex;
  8. //昵称
  9. std::string mNickName;
  10. //用户ID(10099001~10099500)
  11. int mPlayerId;
  12. //VIP等级
  13. int mVip;
  14. //头像
  15. int mHead;
  16. //头像框
  17. int mHeadFrame;
  18. //初始金币
  19. int mGold;
  20. //炮台ID
  21. int mTurretID;
  22. //翅膀ID
  23. int mWingID;
  24. //初始道具(id+数量)
  25. std::vector<int> mItems;
  26. };
  27. class M_RobotNameCFG
  28. {
  29. public:
  30. private:
  31. static std::auto_ptr<M_RobotNameCFG> msSingleton;
  32. public:
  33. int GetCount();
  34. const M_RobotNameCFGData* GetData(int index);
  35. boost::unordered_map<int, M_RobotNameCFGData>& GetMapData();
  36. void Reload();
  37. void Load(const std::string& path);
  38. void Load();
  39. static M_RobotNameCFG* GetSingleton();
  40. private:
  41. boost::unordered_map<int, M_RobotNameCFGData> mMapData;
  42. };