#include "ZombieCharacter.h"
#include "EZombieState.h"
#include "Engine/HitResult.h"
#include "EAttackType.h"
#include "EZombieGender.h"
#include "RangedExplosiveEffectData.h"
#include "Net/UnrealNetwork.h"
#include "AuthoritativePoolableActorComponent.h"
#include "Components/SphereComponent.h"
#include "Components/StaticMeshComponent.h"
#include "ZombieBlindableComponent.h"
#include "ChargeableComponent.h"
#include "RangedExplosiveEffectHandlerComponent.h"
#include "FlashlightableComponent.h"
#include "GameplayTagContainerComponent.h"
#include "CharacterPositionRecorderComponent.h"
#include "AuthoritativeMovementComponent.h"
#include "OtherCharactersVerticalCollisionsHandler.h"

class UPrimitiveComponent;
class AActor;
class UFlashlightComponent;

void AZombieCharacter::OnRep_ZombieState(EZombieState previousState)
{

}

void AZombieCharacter::OnRep_ZombieGender()
{

}

void AZombieCharacter::OnRep_OwningKiller()
{

}

void AZombieCharacter::OnEndOverlapZombieAttackDetector(UPrimitiveComponent* hitComponent, AActor* otherActor, UPrimitiveComponent* otherComp, int32 otherBodyIndex)
{

}

void AZombieCharacter::OnBeginOverlapZombieAttackDetector(UPrimitiveComponent* hitComponent, AActor* otherActor, UPrimitiveComponent* otherComp, int32 otherBodyIndex, bool bFromSweep, const FHitResult& sweepResult)
{

}

void AZombieCharacter::Multicast_ZombieKilledByKillerCosmetic_Implementation(EAttackType attackType)
{

}

EZombieGender AZombieCharacter::GetZombieGender() const
{
	return EZombieGender::Male;
}

UOtherCharactersVerticalCollisionsHandler* AZombieCharacter::GetOtherCharactersVerticalCollisionsHandler() const
{
	return NULL;
}

UAuthoritativeMovementComponent* AZombieCharacter::GetAuthoritativeMovementComponent() const
{
	return NULL;
}

FString AZombieCharacter::GetAudioSwitchState() const
{
	return TEXT("");
}

void AZombieCharacter::Authority_OnZombieStateChanged(EZombieState zombieState)
{

}

void AZombieCharacter::Authority_OnRangedExplosiveInRangeBegin(const FRangedExplosiveEffectData& effectData)
{

}

void AZombieCharacter::Authority_OnFlashlightRemoved(const UFlashlightComponent* flashlight)
{

}

void AZombieCharacter::Authority_OnFlashlightAdded(const UFlashlightComponent* flashlight)
{

}

void AZombieCharacter::Authority_DeactivateZombieAndStartRespawnTimer()
{

}

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

	DOREPLIFETIME(AZombieCharacter, _zombieState);
	DOREPLIFETIME(AZombieCharacter, _zombieGender);
	DOREPLIFETIME(AZombieCharacter, _owningKiller);
	DOREPLIFETIME(AZombieCharacter, _audioSwitchState);
}

AZombieCharacter::AZombieCharacter()
{
	this->_poolableComponent = CreateDefaultSubobject<UAuthoritativePoolableActorComponent>(TEXT("PollableComponent"));
	this->_zombieAttackDetector = CreateDefaultSubobject<USphereComponent>(TEXT("ZombieAttackDetector"));
	this->_attackDamageZone = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("ZombieAttackDamageZone"));
	this->_zombieState = EZombieState::InPool;
	this->_zombieGender = EZombieGender::Male;
	this->_audioSwitchState = TEXT("SVR_M01");
	this->_blindableComponent = CreateDefaultSubobject<UZombieBlindableComponent>(TEXT("ZombieBlindableComponent"));
	this->_blindingChargeableComponent = CreateDefaultSubobject<UChargeableComponent>(TEXT("BlindnessChargeableComponent"));
	this->_rangedExplosiveEffectHandlerComponent = CreateDefaultSubobject<URangedExplosiveEffectHandlerComponent>(TEXT("RangedExplosiveEffectHandlerComponent"));
	this->_flashLightableComponent = CreateDefaultSubobject<UFlashlightableComponent>(TEXT("EyesFlashlightableComponent"));
	this->_objectState = CreateDefaultSubobject<UGameplayTagContainerComponent>(TEXT("ObjectState"));
	this->_positionRecorder = CreateDefaultSubobject<UCharacterPositionRecorderComponent>(TEXT("Position Recorder"));
	this->_authoritativeMovementComponent = CreateDefaultSubobject<UAuthoritativeMovementComponent>(TEXT("AuthoritativeMovement"));
	this->_otherCharactersVerticalCollisionsHandler = CreateDefaultSubobject<UOtherCharactersVerticalCollisionsHandler>(TEXT("OtherCharactersVerticalCollisionsHandler"));
	this->_zombieStunnedCapsuleRadius = 15.000000;
	this->_minFallHeight = 50.000000;
	this->_afterInAirAttackCooldown = 0.800000;
}
