/// <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()); }
public static BaseRelation CreateRelation(CharacterRelationRecord relationRecord) { if (relationRecord == null) { return(null); } return(CreateRelation(relationRecord.CharacterId, relationRecord.RelatedCharacterId, relationRecord.RelationType)); }
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); }
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)); }
/// <summary> /// Creates a new character relation based on a <see cref="CharacterRelationRecord"/> /// </summary> protected PersistedRelation(CharacterRelationRecord relation) { m_charRelationRecord = relation; }
/// <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); }
/// <summary> /// Default constructor /// </summary> public PersistedRelation() { m_charRelationRecord = new CharacterRelationRecord(); }
/// <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; }
/// <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); }
/// <summary>Default constructor</summary> public PersistedRelation() { this.m_charRelationRecord = new CharacterRelationRecord(); }
/// <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()); }