class AddDevelopmentPointEffector extends Effector
{
	var m_amount : Int32;
	var m_type : gamedataDevelopmentPointType;
	var m_tdbid : TweakDBID;

	protected export override function Initialize( record : TweakDBID, game : GameInstance, parentRecord : TweakDBID )
	{
		var str : String;
		m_amount = TweakDBInterface.GetInt( record + T".amountOfPoints", 0 );
		m_tdbid = record;
		str = TweakDBInterface.GetString( record + T".pointsType", "" );
		m_type = ( ( gamedataDevelopmentPointType )( ( ( Int32 )( EnumValueFromString( "gamedataDevelopmentPointType", str ) ) ) ) );
	}

	protected export override function ActionOn( owner : GameObject )
	{
		var addDevPointRequest : AddDevelopmentPoints;
		GameInstance.GetTelemetrySystem( owner.GetGame() ).LogDevPointsAddedFromReward( m_tdbid, m_amount, m_type );
		addDevPointRequest = new AddDevelopmentPoints;
		addDevPointRequest.Set( owner, m_amount, m_type );
		PlayerDevelopmentSystem.GetInstance( owner ).QueueRequest( addDevPointRequest );
	}

}

class BuyAttributeEffector extends Effector
{
	var m_type : gamedataStatType;

	protected override function Initialize( record : TweakDBID, game : GameInstance, parentRecord : TweakDBID )
	{
		var str : String;
		str = TweakDBInterface.GetString( record + T".attributeType", "" );
		m_type = ( ( gamedataStatType )( ( ( Int32 )( EnumValueFromString( "gamedataStatType", str ) ) ) ) );
	}

	protected override function ActionOn( owner : GameObject )
	{
		var butAttributeRequest : BuyAttribute;
		if( !( PlayerDevelopmentData.IsAttribute( m_type ) ) )
		{
			return;
		}
		butAttributeRequest = new BuyAttribute;
		butAttributeRequest.Set( owner, m_type, true );
		PlayerDevelopmentSystem.GetInstance( owner ).QueueRequest( butAttributeRequest );
	}

}

