using MMOserver.Packet; namespace MMOserver.Game; public class Player { public int HashKey { get; set; } public int PlayerId { get; set; } public string Nickname { get; set; } = string.Empty; public int Level { get; set; } public int Hp { get; set; } public int MaxHp { get; set; } public int Mp { get; set; } public int MaxMp { get; set; } public int Experience { get; set; } public int NextExp { get; set; } public float AttackPower { get; set; } public float AttackRange { get; set; } public float SprintMultiplier { get; set; } // 위치/방향 (클라이언트 패킷과 동일하게 float) public float PosX { get; set; } public float PosY { get; set; } public float PosZ { get; set; } public float RotY { get; set; } // 현재 위치한 맵 ID public int CurrentMapId { get; set; } // 레이드 입장 전 이전 맵 ID (레이드 종료 후 복귀용, 서버 캐싱) public int PreviousMapId { get; set; } public PlayerInfo ToPlayerInfo() { return new PlayerInfo { PlayerId = this.PlayerId, Nickname = this.Nickname, Level = this.Level, Hp = this.Hp, MaxHp = this.MaxHp, Mp = this.Mp, MaxMp = this.MaxMp, Position = new Position { X = this.PosX, Y = this.PosY, Z = this.PosZ }, RotY = this.RotY, Experience = this.Experience, NextExp = this.NextExp, AttackPower = this.AttackPower, AttackRange = this.AttackRange, SprintMultiplier = this.SprintMultiplier, }; } }