internal Player(string name, string password, Guid id, Dictionary <Entity, uint> factionAccessRoles) { ID = id; Name = string.IsNullOrEmpty(name) ? "Unnamed Player" : name; FactionAccessRoles = factionAccessRoles; Salt = GenerateSalt(); PasswordHash = GeneratePasswordHash(password, Salt); Orders = new OrderQueue(); }
public Player(SerializationInfo info, StreamingContext context) { ID = (Guid)info.GetValue(nameof(ID), typeof(Guid)); Name = info.GetString(nameof(Name)); if (context.State != StreamingContextStates.Persistence) { return; } PasswordHash = info.GetString(nameof(PasswordHash)); Salt = info.GetString(nameof(Salt)); FactionAccessRoles = (Dictionary <Entity, uint>)info.GetValue(nameof(FactionAccessRoles), typeof(Dictionary <Entity, uint>)); Orders = new OrderQueue(); HaltsOnEvent = (Dictionary <EventType, bool>)info.GetValue(nameof(HaltsOnEvent), typeof(Dictionary <EventType, bool>)); }
public OrderQueue(OrderQueue oq) { _orderList = oq._orderList.Select(item => (Entity)item.Clone()).ToList(); _entityManager = oq._entityManager; }
public OrderQueue(OrderQueue oq) { _orderList = _orderList.Select(item => (BaseOrder)item.Clone()).ToList(); //_entityManager = oq._entityManager; }