CommonLibSSE (powerof3)
EffectArchetypes.h
Go to the documentation of this file.
1 #pragma once
2 
3 namespace RE
4 {
6  {
7  enum class ArchetypeID
8  {
9  kNone = static_cast<std::underlying_type_t<ArchetypeID>>(-1),
10  kValueModifier = 0,
11  kScript = 1,
12  kDispel = 2,
13  kCureDisease = 3,
14  kAbsorb = 4,
15  kDualValueModifier = 5,
16  kCalm = 6,
17  kDemoralize = 7,
18  kFrenzy = 8,
19  kDisarm = 9,
20  kCommandSummoned = 10,
21  kInvisibility = 11,
22  kLight = 12,
23  kDarkness = 13,
24  kNightEye = 14,
25  kLock = 15,
26  kOpen = 16,
27  kBoundWeapon = 17,
28  kSummonCreature = 18,
29  kDetectLife = 19,
30  kTelekinesis = 20,
31  kParalysis = 21,
32  kReanimate = 22,
33  kSoulTrap = 23,
34  kTurnUndead = 24,
35  kGuide = 25,
36  kWerewolfFeed = 26,
37  kCureParalysis = 27,
38  kCureAddiction = 28,
39  kCurePoison = 29,
40  kConcussion = 30,
41  kValueAndParts = 31,
42  kAccumulateMagnitude = 32,
43  kStagger = 33,
44  kPeakValueModifier = 34,
45  kCloak = 35,
46  kWerewolf = 36,
47  kSlowTime = 37,
48  kRally = 38,
49  kEnhanceWeapon = 39,
50  kSpawnHazard = 40,
51  kEtherealize = 41,
52  kBanish = 42,
53  kSpawnScriptedRef = 43,
54  kDisguise = 44,
55  kGrabActor = 45,
56  kVampireLord = 46
57  };
58  };
60 
61  [[nodiscard]] std::string_view EffectArchetypeToString(EffectArchetype a_archetype) noexcept;
62 }
63 
64 namespace std
65 {
66  [[nodiscard]] inline std::string to_string(RE::EffectArchetype a_archetype)
67  {
68  return RE::EffectArchetypeToString(a_archetype).data();
69  }
70 }
71 
72 #ifdef FMT_VERSION
73 namespace fmt
74 {
75  template <>
76  struct formatter<RE::EffectArchetype>
77  {
78  template <class ParseContext>
79  constexpr auto parse(ParseContext& a_ctx)
80  {
81  return a_ctx.begin();
82  }
83 
84  template <class FormatContext>
85  auto format(const RE::EffectArchetype& a_archetype, FormatContext& a_ctx)
86  {
87  return fmt::format_to(a_ctx.out(), "{}", RE::EffectArchetypeToString(a_archetype));
88  }
89  };
90 }
91 #endif
92 
93 #ifdef __cpp_lib_format
94 namespace std
95 {
96  template <class CharT>
97  struct formatter<RE::EffectArchetype, CharT> : std::formatter<std::string_view, CharT>
98  {
99  template <class FormatContext>
100  auto format(RE::EffectArchetype a_archetype, FormatContext& a_ctx)
101  {
102  return formatter<std::string_view, CharT>::format(RE::EffectArchetypeToString(a_archetype), a_ctx);
103  }
104  };
105 }
106 #endif
Definition: AbsorbEffect.h:6
EffectArchetypes::ArchetypeID EffectArchetype
Definition: EffectArchetypes.h:59
std::string_view EffectArchetypeToString(EffectArchetype a_archetype) noexcept
string(const CharT(&)[N]) -> string< CharT, N - 1 >
Definition: EffectArchetypes.h:65
std::string to_string(RE::EffectArchetype a_archetype)
Definition: EffectArchetypes.h:66
Definition: EffectArchetypes.h:6
ArchetypeID
Definition: EffectArchetypes.h:8