// Project Lab - NHTV Igad

#include "UnrealProject.h"
#include "Modifier.h"
#include "NetworkCharacter.h"
#include "AuraTrigger.h"





AModifier* AAuraTrigger::GetModifier(class ANetworkCharacter* targetCharacter)
{
	auto it = data.Find(targetCharacter);
	if (it==nullptr)
		return nullptr;
	return *it;
}
void AAuraTrigger::SetModifier(class ANetworkCharacter* targetCharacter, AModifier* modifier)
{
	data.Add(targetCharacter, modifier);
}

void AAuraTrigger::Tick(float DeltaSeconds)
{
	Super::Tick(DeltaSeconds);
	if (Role == ROLE_Authority && IsValid(followObject))
	{
		SetActorLocation(followObject->GetActorLocation());
	}
}