Aura.Channel.Database.Account.GetCharacterOrPet C# (CSharp) Method

GetCharacterOrPet() public method

Returns character or pet with the given entity id, or null, if entity wasn't found.
public GetCharacterOrPet ( long entityId ) : Aura.Channel.World.Entities.PlayerCreature
entityId long
return Aura.Channel.World.Entities.PlayerCreature
		public PlayerCreature GetCharacterOrPet(long entityId)
		{
			PlayerCreature result = this.Characters.FirstOrDefault(a => a.EntityId == entityId);
			if (result == null)
				result = this.Pets.FirstOrDefault(a => a.EntityId == entityId);
			return result;
		}