Bazaar improvements, moved some stuff into cpp and start creating the settings asset
This commit is contained in:
25
Source/ProjectEleri/Data/BazarSettingsDataAsset.cpp
Normal file
25
Source/ProjectEleri/Data/BazarSettingsDataAsset.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
// 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: ;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user