#include "K36TreasureChest.h"
#include "EK36TreasureChestState.h"
#include "Net/UnrealNetwork.h"
#include "Components/SceneComponent.h"
#include "Components/BoxComponent.h"
#include "DBDSkeletalMeshComponentBudgeted.h"
#include "MontagePlayer.h"
#include "AnimationMontageSlave.h"
#include "DBDOutlineComponent.h"
#include "K36TreasureChestOutlineUpdateStrategy.h"
#include "Interactor.h"
#include "ChargeableComponent.h"

class ASurvivor;

void AK36TreasureChest::OnRep_TreasureChestState(EK36TreasureChestState previousChestState)
{

}

void AK36TreasureChest::OnRep_TrappedSurvivor(ASurvivor* previousTrappedSurvivor)
{

}

void AK36TreasureChest::OnRep_ResetTimer()
{

}

void AK36TreasureChest::OnRep_ItemInChest()
{

}

void AK36TreasureChest::OnRep_HasBeenRevealedAsMimic()
{

}

void AK36TreasureChest::OnLocallyObservedPawnChanged()
{

}

void AK36TreasureChest::Multicast_TriggerDiceRoll_Implementation(ASurvivor* survivor, int32 diceRollValue)
{

}

EK36TreasureChestState AK36TreasureChest::GetTreasureChestState() const
{
	return EK36TreasureChestState::Closed;
}

void AK36TreasureChest::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
	Super::GetLifetimeReplicatedProps(OutLifetimeProps);

	DOREPLIFETIME(AK36TreasureChest, _itemInChest);
	DOREPLIFETIME(AK36TreasureChest, _trappedSurvivor);
	DOREPLIFETIME(AK36TreasureChest, _treasureChestState);
	DOREPLIFETIME(AK36TreasureChest, _resetTimer);
	DOREPLIFETIME(AK36TreasureChest, _rollValue);
	DOREPLIFETIME(AK36TreasureChest, _hasBeenRevealedAsMimic);
}

AK36TreasureChest::AK36TreasureChest()
{
	this->_rootComponent = CreateDefaultSubobject<USceneComponent>(TEXT("RootComponent"));
	this->_collisionComponent = CreateDefaultSubobject<UBoxComponent>(TEXT("CollisionComponent"));
	this->_skeletalMeshComponent = CreateDefaultSubobject<UDBDSkeletalMeshComponentBudgeted>(TEXT("SkeletalMeshComponent"));
	this->_mimicSkeletalMeshComponent = CreateDefaultSubobject<UDBDSkeletalMeshComponentBudgeted>(TEXT("MimicSkeletalMeshComponent"));
	this->_mimicDisguiseMeshComponent = CreateDefaultSubobject<UDBDSkeletalMeshComponentBudgeted>(TEXT("MimicDisguiseSkeletalMeshComponent"));
	this->_montagePlayer = CreateDefaultSubobject<UMontagePlayer>(TEXT("MontagePlayer"));
	this->_montageFollower = CreateDefaultSubobject<UAnimationMontageSlave>(TEXT("MontageFollower"));
	this->_treasureChestState = EK36TreasureChestState::Closed;
	this->_magicItemSocketName = NAME_None;
	this->_outlineComponent = CreateDefaultSubobject<UDBDOutlineComponent>(TEXT("OutlineComponent"));
	this->_treasureOutlineUpdateStrategy = CreateDefaultSubobject<UK36TreasureChestOutlineUpdateStrategy>(TEXT("TreasureChestOutlineUpdateStrategy"));
	this->_interactionZone = CreateDefaultSubobject<UBoxComponent>(TEXT("InteractionZone"));
	this->_interactor = CreateDefaultSubobject<UInteractor>(TEXT("Interactor"));
	this->_openTreasureChestChargeableComponent = CreateDefaultSubobject<UChargeableComponent>(TEXT("TreasureChestInteractionChargeableComponent"));
	this->_escapeFromMimicChargeableComponent = CreateDefaultSubobject<UChargeableComponent>(TEXT("EscapeFromMimicInteractionChargeableComponent"));
	this->_rollValue = 0;
	this->_hasBeenRevealedAsMimic = false;
}
