Skip to content

Commit

Permalink
Add AIFormulas::GetSoundLevelValue
Browse files Browse the repository at this point in the history
  • Loading branch information
powerof3 committed May 28, 2024
1 parent c709ebf commit 84aee22
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/RE/A/AIFormulas.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

namespace RE
{
enum class SOUND_LEVEL;

class Actor;
class TESForm;

namespace AIFormulas
{
std::int32_t ComputePickpocketSuccess(float a_thiefSkill, float a_targetSkill, std::uint32_t a_valueStolen, float a_weightStolen, Actor* a_thief, Actor* a_target, bool a_isDetected, TESForm* a_itemPickpocketing);
std::int32_t GetSoundLevelValue(SOUND_LEVEL a_soundLevel);
}
}
9 changes: 9 additions & 0 deletions src/RE/A/AIFormulas.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "RE/A/AIFormulas.h"

#include "RE/S/SoundLevels.h"

namespace RE
{
namespace AIFormulas
Expand All @@ -10,5 +12,12 @@ namespace RE
REL::Relocation<func_t> func{ RELOCATION_ID(25822, 26379) };
return func(a_thiefSkill, a_targetSkill, a_valueStolen, a_weightStolen, a_thief, a_target, a_isDetected, a_itemPickpocketing);
}

std::int32_t GetSoundLevelValue(SOUND_LEVEL a_soundLevel)
{
using func_t = decltype(GetSoundLevelValue);
REL::Relocation<func_t> func{ RELOCATION_ID(25814, 26367) };
return func(a_soundLevel);
}
}
}

0 comments on commit 84aee22

Please sign in to comment.