Aura.Channel.World.Entities.Creatures.CreatureQuests.GiveRewards C# (CSharp) Метод

GiveRewards() приватный Метод

Gives quest rewards to creature.
private GiveRewards ( Aura.Channel.World.Quests.Quest quest, ICollection rewards, bool owl ) : void
quest Aura.Channel.World.Quests.Quest Quest the rewards come from.
rewards ICollection Rewards to give to the creature.
owl bool Show owl delivering the rewards?
Результат void
		private void GiveRewards(Quest quest, ICollection<QuestReward> rewards, bool owl)
		{
			if (rewards.Count == 0)
				return;

			// Create list of creatures that will get the rewards.
			var creatures = new List<Creature>();
			if (quest.Data.IsPartyQuest)
				creatures.AddRange(_creature.Party.GetMembers());
			else
				creatures.Add(_creature);

			foreach (var creature in creatures)
			{
				if (owl)
					Send.QuestOwlComplete(creature, quest.UniqueId);

				foreach (var reward in rewards)
				{
					try
					{
						reward.Reward(creature, quest);
					}
					catch (NotImplementedException)
					{
						Log.Unimplemented("Quest.Complete: Reward '{0}'.", reward.Type);
					}
				}
			}
		}