2024-02-15 18:33:05 +00:00
|
|
|
|
using Protocol;
|
|
|
|
|
using GameServer.Settings;
|
2024-02-10 22:28:35 +00:00
|
|
|
|
|
|
|
|
|
namespace GameServer.Models;
|
2024-02-09 09:20:14 +00:00
|
|
|
|
internal class PlayerModel
|
|
|
|
|
{
|
|
|
|
|
public int Id { get; private set; }
|
|
|
|
|
public string Name { get; private set; }
|
2024-02-10 22:28:35 +00:00
|
|
|
|
public int[] Characters { get; private set; }
|
2024-02-15 18:33:05 +00:00
|
|
|
|
public Vector Position { get; private set; }
|
2024-02-09 09:20:14 +00:00
|
|
|
|
|
|
|
|
|
public PlayerModel()
|
|
|
|
|
{
|
|
|
|
|
Name = string.Empty;
|
2024-02-10 22:28:35 +00:00
|
|
|
|
Characters = [];
|
2024-02-15 18:33:05 +00:00
|
|
|
|
Position = new Vector();
|
2024-02-09 09:20:14 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-02-10 22:28:35 +00:00
|
|
|
|
public static PlayerModel CreateDefaultPlayer(PlayerStartingValues startingValues)
|
2024-02-09 09:20:14 +00:00
|
|
|
|
{
|
|
|
|
|
return new PlayerModel
|
|
|
|
|
{
|
|
|
|
|
Id = 1337,
|
2024-02-10 22:28:35 +00:00
|
|
|
|
Name = startingValues.Name,
|
2024-02-15 18:33:05 +00:00
|
|
|
|
Characters = startingValues.Characters,
|
|
|
|
|
Position = startingValues.Position.Clone()
|
2024-02-09 09:20:14 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|