Bazaar improvements, moved some stuff into cpp and start creating the settings asset

This commit is contained in:
2026-08-22 18:10:43 +02:00
parent af29e5f859
commit 4c1f6eab70
11 changed files with 115 additions and 14 deletions

View 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: ;
}
}
}