コード例 #1
0
        /// <summary>
        /// Loads all Factions that this Character already knows from the DB
        /// </summary>
        public void Load()
        {
            foreach (var record in ReputationRecord.Load(m_owner.Record.Guid))
            {
                var fac = FactionMgr.Get(record.ReputationIndex);
                if (fac != null)
                {
                    if (m_byIndex.ContainsKey(record.ReputationIndex))
                    {
                        log.Warn("Character {0} had Reputation with Faction {1} more than once.", m_owner, record.ReputationIndex);
                    }
                    else
                    {
                        var rep = new Reputation(record, fac);
                        m_byIndex.Add(record.ReputationIndex, rep);
                    }
                }
                else
                {
                    log.Warn("Character {0} has saved Reputation with invalid Faction: {1}", m_owner, record.ReputationIndex);

                    // record.DeleteAndFlush();
                }
            }
        }
コード例 #2
0
 /// <summary>
 /// Loads all Factions that this Character already knows from the DB
 /// </summary>
 public void Load()
 {
     foreach (ReputationRecord record in ReputationRecord.Load(this.m_owner.Record.Guid))
     {
         Faction faction = FactionMgr.Get(record.ReputationIndex);
         if (faction != null)
         {
             if (this.m_byIndex.ContainsKey(record.ReputationIndex))
             {
                 ReputationCollection.log.Warn("Character {0} had Reputation with Faction {1} more than once.",
                                               (object)this.m_owner, (object)record.ReputationIndex);
             }
             else
             {
                 Reputation reputation = new Reputation(record, faction);
                 this.m_byIndex.Add(record.ReputationIndex, reputation);
             }
         }
         else
         {
             ReputationCollection.log.Warn("Character {0} has saved Reputation with invalid Faction: {1}",
                                           (object)this.m_owner, (object)record.ReputationIndex);
         }
     }
 }
コード例 #3
0
ファイル: Reputation.cs プロジェクト: uvbs/Asda2-Server
 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();
 }
コード例 #4
0
ファイル: Reputation.cs プロジェクト: 0xFh/Asda2-Project
 public Reputation(ReputationRecord record, Faction faction, int defaultValue, ReputationFlags defaultFlags)
 {
     m_record = record;
     m_record.ReputationIndex = faction.ReputationIndex;
     m_record.Value           = defaultValue;
     m_record.Flags           = defaultFlags;
     Faction    = faction;
     m_standing = GetStanding(defaultValue);
     m_record.Save();
 }
コード例 #5
0
ファイル: Reputation.cs プロジェクト: WCellFR/WCellFR
		public Reputation(ReputationRecord record, Faction faction, int defaultValue, ReputationFlags defaultFlags)
		{
			m_record = record;
			m_record.ReputationIndex = faction.ReputationIndex;
			m_record.Value = defaultValue;
		    m_record.Flags = defaultFlags;

			Faction = faction;
			m_standing = GetStanding(defaultValue);

		    m_record.Save();
		}
コード例 #6
0
ファイル: Reputation.cs プロジェクト: NecroSharper/WCell
 /// <summary>
 /// Loads an existing Reputation from the given Record.
 /// </summary>
 public Reputation(ReputationRecord record, Faction faction)
 {
     m_record   = record;
     Faction    = faction;
     m_standing = GetStanding(record.Value);
 }
コード例 #7
0
ファイル: Reputation.cs プロジェクト: uvbs/Asda2-Server
 /// <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);
 }
コード例 #8
0
ファイル: Reputation.cs プロジェクト: WCellFR/WCellFR
		/// <summary>
		/// Loads an existing Reputation from the given Record.
		/// </summary>
		public Reputation(ReputationRecord record, Faction faction)
		{
			m_record = record;
			Faction = faction;
			m_standing = GetStanding(record.Value);
		}