/// <summary>
 /// Resets legal reputation for all regions back to 0.
 /// Not fully implemented yet, still needs to be imported from SAVEVARS.DAT.
 /// Might move to own class later, but here is a good spot for now.
 /// </summary>
 public void ResetLegalReputation()
 {
     // Clear legal reputation across all regions
     legalReputationList.Clear();
     for (int i = 0; i < legalReputationCount; i++)
     {
         LegalReputation lr = new LegalReputation();
         lr.index = i;
         lr.value = 0;
         lr.name  = DaggerfallUnity.Instance.ContentReader.MapFileReader.GetRegionName(i);
         legalReputationList.Add(lr);
     }
 }
        /// <summary>
        /// Change legal reputation value by amount.
        /// </summary>
        public int ChangeLegalReputation(int regionIndex, int amount)
        {
            if (regionIndex < 0 || regionIndex >= legalReputationCount)
            {
                throw new IndexOutOfRangeException("ChangeLegalReputation regionIndex out of range");
            }

            // Reset if no legal reputation data available
            if (legalReputationList.Count != legalReputationCount)
            {
                ResetLegalReputation();
            }

            LegalReputation lr = legalReputationList[regionIndex];

            lr.value = Mathf.Clamp(lr.value + amount, minReputation, maxReputation);
            legalReputationList[regionIndex] = lr;

            return(lr.value);
        }