#pragma once

#include "CoreMinimal.h"
#include "K36SpellInteraction.h"
#include "DBDTunableRowHandle.h"
#include "Templates/SubclassOf.h"
#include "UObject/NoExportTypes.h"
#include "K36DetectionSpellInteraction.generated.h"

class AK36DispellingSphere;
class AKiller;

UCLASS(Blueprintable, EditInlineNew, meta=(BlueprintSpawnableComponent))
class UK36DetectionSpellInteraction : public UK36SpellInteraction
{
	GENERATED_BODY()

private:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	FDBDTunableRowHandle _spawnDistanceFromKiller;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	FDBDTunableRowHandle _trajectoryPreviewLength;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	FDBDTunableRowHandle _trajectoryPreviewWidth;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	FDBDTunableRowHandle _trajectoryPreviewHeight;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	TSubclassOf<AK36DispellingSphere> _dispellingSphereClass;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	float _timeToGetControlsBack;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	float _resetControlsLerpTime;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess=true))
	float _pitchYawScalingAfterLaunchingSphere;

	UPROPERTY(EditInstanceOnly, BlueprintReadWrite, Replicated, Transient, meta=(AllowPrivateAccess=true))
	AK36DispellingSphere* _dispellingSphere;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Replicated, meta=(AllowPrivateAccess=true))
	bool _hasLaunchedSphere;

private:
	UFUNCTION(BlueprintCallable, Server, Reliable, WithValidation)
	void Server_RequestSphereLaunch(AKiller* killer, const FVector& sphereLocation, const FRotator& launchDirection);

public:
	virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;

public:
	UK36DetectionSpellInteraction();
};

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