class Dialogue_EventListener_SE extends Dialogue_EventListener
dependson(KF_DialogueSpot_SE);

function Trigger( actor Other, pawn EventInstigator )
{
	local KF_DialogueSpot_SE DlgOwnerSE;
	
	DlgOwnerSE = KF_DialogueSpot_SE(DlgOwner);
	if ( DlgOwnerSE == none || DlgOwnerSE.RequiredEventType == RET_Trigger ) {
		super.Trigger(Other, EventInstigator);
		return;
	}
	
	if(DlgOwner.bDebugDialogue)
	{
		log("----- DIALOGUE DEBUG ------  DialogueListener was triggered for Index "@AssociatedIndex@"Received event : "@DlgOwner.Dialogues[AssociatedIndex].Events.RequiredEvent@",triggered by : "@Other@" .. Proceeding ", 'Story_Debug');
	}

	// if bLooping=True, dialogue is DISABLED
	switch (DlgOwnerSE.RequiredEventType) {
		case RET_Enable:
			DlgOwner.Dialogues[AssociatedIndex].bWasTriggered = false;
			break;
		case RET_Disable:
			DlgOwner.Dialogues[AssociatedIndex].bWasTriggered = true;
			break;
		case RET_Toggle:
			DlgOwner.Dialogues[AssociatedIndex].bWasTriggered = !DlgOwner.Dialogues[AssociatedIndex].bWasTriggered;
			break;			
	}
}

defaultproperties
{
}
