Пример #1
0
 public Reputation(ReputationRecord record, Faction faction, int defaultValue, ReputationFlags defaultFlags)
 {
     this.m_record = record;
     this.m_record.ReputationIndex = faction.ReputationIndex;
     this.m_record.Value           = defaultValue;
     this.m_record.Flags           = defaultFlags;
     this.Faction    = faction;
     this.m_standing = Reputation.GetStanding(defaultValue);
     this.m_record.Save();
 }
Пример #2
0
        /// <summary>
        /// Changes the reputation value with a specific Faction.
        /// Is called by ReputationCollect.SetValue
        /// </summary>
        /// <param name="value"></param>
        /// <returns>Whether hostility changed due to the stending change</returns>
        internal bool SetValue(int value)
        {
            Standing standing = this.m_standing;
            bool     hostile1 = this.Hostile;

            this.m_standing = Reputation.GetStanding(value);
            bool hostile2 = this.Hostile;

            this.m_record.Value = value;
            if (standing != this.m_standing)
            {
                return(hostile1 != hostile2);
            }
            return(false);
        }
Пример #3
0
 /// <summary>Loads an existing Reputation from the given Record.</summary>
 public Reputation(ReputationRecord record, Faction faction)
 {
     this.m_record   = record;
     this.Faction    = faction;
     this.m_standing = Reputation.GetStanding(record.Value);
 }