importonly class ChatterHelper extends IScriptable
{
	public import static function PlayVoiceOver( instigator : GameObject, voName : CName );
	public import static function PlayCpoServerSyncVoiceOver( instigator : GameObject, voName : CName );
	public import static function PlayCpoClientVoiceOver( instigator : GameObject, voName : CName );
	public import static function TryPlayReloadChatter( instigator : GameObject );
	public import static function TryPlayEnemyKilledChatter( instigator : GameObject );
	public import static function TryPlayEnemyDamagedChatter( instigator : GameObject );
	public import static function TryPlayScanStartedChatter( instigator : GameObject );
	public import static function TryPlayScanCompleteChatter( instigator : GameObject );
	public import static function TryPlayEnterCombatChatter( instigator : GameObject );
	public import static function TryPlayLeaveCombatChatter( instigator : GameObject );
}

class CoopIrritationDelayCallback extends DelayCallback
{
	var m_companion : weak< GameObject >;

	public static function TryCreate( dmgInstigator : weak< GameObject > )
	{
		var delayCallback : CoopIrritationDelayCallback;
		if( dmgInstigator && ScriptedPuppet.IsPlayerCompanion( dmgInstigator ) )
		{
			delayCallback = new CoopIrritationDelayCallback;
			delayCallback.m_companion = dmgInstigator;
			GameInstance.GetDelaySystem( dmgInstigator.GetGame() ).DelayCallback( delayCallback, 10.0 );
		}
	}

	public override function Call()
	{
		var playerPuppet : weak< PlayerPuppet >;
		if( !( ScriptedPuppet.IsActive( m_companion ) ) )
		{
			return;
		}
		playerPuppet = ( ( PlayerPuppet )( GameInstance.GetPlayerSystem( m_companion.GetGame() ).GetLocalPlayerMainGameObject() ) );
		if( ( !( playerPuppet ) || !( playerPuppet.GetTargetTrackerComponent().HasHostileThreat( false ) ) ) || !( m_companion.GetTargetTrackerComponent().HasHostileThreat( false ) ) )
		{
			return;
		}
		if( EngineTime.ToFloat( GameInstance.GetSimTime( m_companion.GetGame() ) - playerPuppet.GetLastDamageInflictedTime() ) >= 10.0 )
		{
			GameObject.PlayVoiceOver( m_companion, 'coop_irritation', 'CoopIrritationDelayCallback' );
		}
	}

}

