141 lines
2.1 KiB
C#
141 lines
2.1 KiB
C#
using MMOserver.Game.Engine;
|
|
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;
|
|
}
|
|
|
|
public Vector3 Position
|
|
{
|
|
get;
|
|
set;
|
|
} = new Vector3(0, 0, 0);
|
|
|
|
public float RotY
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
// 현재 위치한 맵 ID
|
|
public int CurrentMapId
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
// 레이드 입장 전 이전 맵 ID (레이드 종료 후 복귀용, 서버 캐싱)
|
|
public int PreviousMapId
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
// 현재 위치한 맵의 존 ID
|
|
public int CurrentZoneId
|
|
{
|
|
get;
|
|
set;
|
|
} = 0;
|
|
|
|
// 패킷용 전환
|
|
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.Position.X, Y = this.Position.Y, Z = this.Position.Z },
|
|
RotY = this.RotY,
|
|
Experience = this.Experience,
|
|
NextExp = this.NextExp,
|
|
AttackPower = this.AttackPower,
|
|
AttackRange = this.AttackRange,
|
|
SprintMultiplier = this.SprintMultiplier,
|
|
};
|
|
}
|
|
}
|