/**********************************************************
RunUO 2.0 AoV C# script file
Official Age of Valor Script :: www.uovalor.com
Last modified by 
Filepath: scripts\_custom\quests\bodquest\RewardEntry.cs
Lines of code: 38
***********************************************************/


using System;
using Server;
using Server.Items;
using Server.Engines.BulkOrders;
using System.Collections;
using System.Collections.Generic;

namespace Server.Engines.Quests.Bods
{
		
		public class RewardEntry
		{
			private RewardType m_reward;
			private int m_intensitymin;
			private int m_intensitymax;
			
			public int IntensityMin{get{return m_intensitymin;}}
			public int IntensityMax{get{return m_intensitymax;}}
						
			
			public RewardEntry(RewardType preward,int pintensitymin,int pintensitymax)
			{
				m_reward=preward;
				m_intensitymin=pintensitymin;
				m_intensitymax=pintensitymax;
			}
			
			public RewardEntry(RewardType preward,int pintensity) : this(preward,pintensity,pintensity)
			{
			}
						
			public bool ValidIntensity(int intensity,int tolerance)
			{
				return ((intensity+tolerance)>=IntensityMin) && ((intensity-tolerance)<=IntensityMax);			
			}
			
			public bool ValidIntensity(int intensity)
			{
				return ValidIntensity(intensity,0);
			}	

			public Item GenerateReward()
			{
				return m_reward.Generate();
			}
				
		}
}