26 lines
698 B
C++
26 lines
698 B
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
#include "BazarSettingsDataAsset.h"
|
|
|
|
void UBazarSettingsDataAsset::GetModifiersFromEmotionData(const FBazarDialogueEmotionData& InData, int32& OutAnger,
|
|
int32& OutFear, int32& OutSadness)
|
|
{
|
|
for (const FBazarEmotionModifier& Mod : InData.EmotionModifiers)
|
|
{
|
|
switch (Mod.Emotion)
|
|
{
|
|
case EBazarNpcEmotion::Anger:
|
|
OutAnger = FMath::RandRange(Mod.ValueMin, Mod.ValueMax);
|
|
break;
|
|
case EBazarNpcEmotion::Fear:
|
|
OutFear = FMath::RandRange(Mod.ValueMin, Mod.ValueMax);
|
|
break;
|
|
case EBazarNpcEmotion::Sadness:
|
|
OutSadness = FMath::RandRange(Mod.ValueMin, Mod.ValueMax);
|
|
break;
|
|
default: ;
|
|
}
|
|
}
|
|
}
|