#pragma once

#include "CoreMinimal.h"
#include "InteractionDefinition.h"
#include "DBDTunableRowHandle.h"
#include "TunableStat.h"
#include "Templates/SubclassOf.h"
#include "UObject/NoExportTypes.h"
#include "K32KillerToSurvivorTeleportInteractionDefinition.generated.h"

class UStatusEffect;
class UK32KillerInstinctStatusEffect;
class ADBDPlayer;
class ASurvivor;
class AK32KillerPod;
class APallet;
class AKiller;

UCLASS(Blueprintable, EditInlineNew, meta=(BlueprintSpawnableComponent))
class UK32KillerToSurvivorTeleportInteractionDefinition : public UInteractionDefinition
{
	GENERATED_BODY()

protected:
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FDBDTunableRowHandle _teleportInDuration;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FDBDTunableRowHandle _snappingDuration;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FDBDTunableRowHandle _wakeUpTime;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FDBDTunableRowHandle _killerCollisionIgnoredLingerTime;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FDBDTunableRowHandle _teleportDurationExtensionThirdPersonAntiCamp;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FTunableStat _overclockDuration;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FTunableStat _overheatDuration;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TSubclassOf<UStatusEffect> _overclockStatusEffect;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TSubclassOf<UStatusEffect> _overheatStatusEffect;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	float _killerSize;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TSubclassOf<UK32KillerInstinctStatusEffect> _teleportKillerInstinctStatusEffect;

	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FDBDTunableRowHandle _teleportKillerInstinctDuration;

private:
	UFUNCTION(BlueprintCallable)
	void StartTeleportOut(ADBDPlayer* player);

	UFUNCTION(BlueprintCallable, Server, Reliable)
	void Server_SetTeleportTarget(ASurvivor* survivor, AK32KillerPod* initiatedPod);

	UFUNCTION(BlueprintCallable)
	void OnLevelReadyToPlay();

	UFUNCTION(BlueprintCallable)
	void OnKillerCollisionIngoreLingerComplete(ADBDPlayer* player);

	UFUNCTION(BlueprintCallable, NetMulticast, Reliable)
	void Multicast_SetTeleportTarget(ASurvivor* survivor, const FVector& teleportEndLocation, const FVector& teleportStartLocation, AK32KillerPod* initiatedPod);

	UFUNCTION(BlueprintCallable, NetMulticast, Reliable)
	void Multicast_OnTeleportStarted(ADBDPlayer* player, const FVector& teleportStartLocation, const FVector& teleportEndLocation);

	UFUNCTION(BlueprintCallable, NetMulticast, Reliable)
	void Multicast_OnTeleportEnded(ADBDPlayer* player);

	UFUNCTION(BlueprintCallable, NetMulticast, Reliable)
	void Multicast_DestroyPallet(APallet* pallet);

protected:
	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, BlueprintCosmetic)
	void Cosmetic_OnTeleportStart(AKiller* killer, const FVector& teleportEndLocation, const FVector& teleportStartLocation);

	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, BlueprintCosmetic)
	void Cosmetic_OnTeleportEnd(AKiller* killer);

	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, BlueprintCosmetic)
	void Cosmetic_EnableTeleportVignette(AKiller* killer);

	UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, BlueprintCosmetic)
	void Cosmetic_DisableTeleportVignette(AKiller* killer);

public:
	UK32KillerToSurvivorTeleportInteractionDefinition();
};

FORCEINLINE uint32 GetTypeHash(const UK32KillerToSurvivorTeleportInteractionDefinition) { return 0; }
