private bool CheckPrerequisites(Creature character)
{
// Check if creature can receive the quest,
// based on the quest's settings.
if (this.Availability <= QuestAvailability.Characters && !character.IsCharacter)
return false;
// Check if receive method is auto and creature doesn't have it yet.
if (this.ReceiveMethod != Receive.Automatically || character.Quests.Has(this.Id))
return false;
// Actually check prerequisites
return this.Prerequisites.All(prerequisite => prerequisite.Met(character));
}