class AddItemsEffector extends Effector
{
	var m_items : array< weak< InventoryItem_Record > >;

	protected export override function Initialize( record : TweakDBID, game : GameInstance, parentRecord : TweakDBID )
	{
		TweakDBInterface.GetAddItemsEffectorRecord( record ).ItemsToAdd( m_items );
	}

	protected export override function ActionOn( owner : GameObject )
	{
		var i : Int32;
		var ts : TransactionSystem;
		ts = GameInstance.GetTransactionSystem( owner.GetGame() );
		for( i = 0; i < m_items.Size(); i += 1 )
		{
			ts.GiveItem( owner, ItemID.FromTDBID( m_items[ i ].Item().GetID() ), m_items[ i ].Quantity() );
		}
	}

}

