コード例 #1
0
        /// <summary>
        /// Retrieves the list of character relations of a character
        /// </summary>
        /// <param name="charLowId">The character Id</param>
        /// <returns>The list of relations of the character.</returns>
        public static BaseRelation[] GetByCharacterId(uint charLowId)
        {
            CharacterRelationRecord[] relations =
                CharacterRelationRecord.FindAllByProperty("_characterId", (long)charLowId);

            return(relations.Select(crr => RelationMgr.CreateRelation(crr)).ToArray());
        }
コード例 #2
0
ファイル: RelationMgr.cs プロジェクト: 0xFh/Asda2-Project
        public static BaseRelation CreateRelation(CharacterRelationRecord relationRecord)
        {
            if (relationRecord == null)
            {
                return(null);
            }

            return(CreateRelation(relationRecord.CharacterId, relationRecord.RelatedCharacterId, relationRecord.RelationType));
        }
コード例 #3
0
ファイル: RelationFactory.cs プロジェクト: KroneckerX/WCell
        public static BaseRelation CreateRelation(CharacterRelationRecord relationRecord)
        {
            if (relationRecord == null)
                return null;

            EntityId charId = EntityId.GetPlayerId(relationRecord.CharacterId);
            EntityId relatedCharId = EntityId.GetPlayerId(relationRecord.RelatedCharacterId);
            CharacterRelationType relationType = relationRecord.RelationType;

            return CreateRelation(charId, relatedCharId, relationType);
        }
コード例 #4
0
ファイル: RelationFactory.cs プロジェクト: NecroSharper/WCell
        public static BaseRelation CreateRelation(CharacterRelationRecord relationRecord)
        {
            if (relationRecord == null)
            {
                return(null);
            }

            EntityId charId                    = EntityId.GetPlayerId(relationRecord.CharacterId);
            EntityId relatedCharId             = EntityId.GetPlayerId(relationRecord.RelatedCharacterId);
            CharacterRelationType relationType = relationRecord.RelationType;

            return(CreateRelation(charId, relatedCharId, relationType));
        }
コード例 #5
0
ファイル: PersistedRelation.cs プロジェクト: KroneckerX/WCell
 /// <summary>
 /// Creates a new character relation based on a <see cref="CharacterRelationRecord"/>
 /// </summary>
 protected PersistedRelation(CharacterRelationRecord relation)
 {
     m_charRelationRecord = relation;
 }
コード例 #6
0
ファイル: PersistedRelation.cs プロジェクト: KroneckerX/WCell
        /// <summary>
        /// Creates a new character relation based on the chars EntityId
        /// </summary>
		public PersistedRelation(uint charId, uint relatedCharId)
        {
            m_charRelationRecord = new CharacterRelationRecord(charId, relatedCharId, this.Type);
        }
コード例 #7
0
ファイル: PersistedRelation.cs プロジェクト: KroneckerX/WCell
 /// <summary>
 /// Default constructor
 /// </summary>
 public PersistedRelation()
 {
     m_charRelationRecord = new CharacterRelationRecord();
 }
コード例 #8
0
 /// <summary>
 /// Creates a new character relation based on a <see cref="T:WCell.RealmServer.Database.CharacterRelationRecord" />
 /// </summary>
 protected PersistedRelation(CharacterRelationRecord relation)
 {
     this.m_charRelationRecord = relation;
 }
コード例 #9
0
 /// <summary>
 /// Creates a new character relation based on the chars EntityId
 /// </summary>
 public PersistedRelation(uint charId, uint relatedCharId)
 {
     this.m_charRelationRecord = new CharacterRelationRecord(charId, relatedCharId, this.Type);
 }
コード例 #10
0
 /// <summary>Default constructor</summary>
 public PersistedRelation()
 {
     this.m_charRelationRecord = new CharacterRelationRecord();
 }
コード例 #11
0
        /// <summary>
        /// Retrieves the list of character relations
        /// </summary>
        /// <returns>The list of all characters relations.</returns>
        public static BaseRelation[] GetAll()
        {
            CharacterRelationRecord[] relations = CharacterRelationRecord.FindAll();

            return(relations.Select(crr => RelationMgr.CreateRelation(crr)).ToArray());
        }