public Character() { CreatedAt = DateTime.Now; LastActivity = DateTime.Now; Locked = false; Hunger = 100; Thirst = 100; Health = 100; Cash = Constants.StartCash; Position = Constants.DefaultSpawnPosition.ToJson(); Rotation = Constants.DefaultSpawnRotation; BankAccountAccess = new List <int>(); Armor = 0; SalaryTime = 0; TotalPlayTime = 0; KeyRing = new KeyRing(); }
public void StringToData() { if (KeyRingString != "" && KeyRingString != null) { KeyRing = JsonConvert.DeserializeObject <KeyRing>(KeyRingString); } else { KeyRing = new KeyRing(); } if (InventoryString != "" && InventoryString != null) { Inventory = JsonConvert.DeserializeObject <List <InventoryItem> >(InventoryString); } else { Inventory = new List <InventoryItem>(); } }