PlayerHelper.cs 635 B

123456789101112131415161718192021222324252627
  1. namespace ET.Server
  2. {
  3. /// <summary>
  4. /// 玩家工具类
  5. /// </summary>
  6. public static class PlayerHelper
  7. {
  8. /// <summary>
  9. /// 玩家信息转proto
  10. /// </summary>
  11. /// <param name="player"></param>
  12. /// <returns></returns>
  13. public static PlayerInfo PlayerToProto(Player player)
  14. {
  15. return new PlayerInfo()
  16. {
  17. id = player.Id,
  18. name = player.Name,
  19. sex = player.Sex,
  20. exp = player.Exp,
  21. level = player.Level,
  22. vip = 0
  23. };
  24. }
  25. }
  26. }