CommonLibSSE (Parapets fork)
Loading...
Searching...
No Matches
TESTopic.h
Go to the documentation of this file.
1#pragma once
2
5#include "RE/F/FormTypes.h"
6#include "RE/T/TESForm.h"
7#include "RE/T/TESFullName.h"
8
9namespace RE
10{
11 struct DIALOGUE_DATA // DATA
12 {
13 enum class TopicFlag
14 {
15 kNone = 0,
17 };
18
19 enum class Subtype
20 {
21 kCustom = 0,
22 kForceGreet = 1,
23 kRumors = 2,
24 kUnk3 = 3, // custom?
25 kIntimidate = 4,
26 kFlatter = 5,
27 kBribe = 6,
28 kAskGift = 7,
29 kGift = 8,
30 kAskFavor = 9,
31 kFavor = 10,
33 kFollow = 12,
34 kReject = 13,
35 kScene = 14,
36 kShow = 15,
37 kAgree = 16,
38 kRefuse = 17,
39 kExitFavorState = 18,
40 kMoralRefusal = 19,
47 kAttack = 26,
48 kPowerAttack = 27,
49 kBash = 28,
50 kHit = 29,
51 kFlee = 30,
52 kBleedout = 31,
53 kAvoidThreat = 32,
54 kDeath = 33,
55 kGroupStrategy = 34,
56 kBlock = 35,
57 kTaunt = 36,
58 kAllyKilled = 37,
59 kSteal = 38,
60 kYield = 39,
61 kAcceptYield = 40,
63 kAssault = 42,
64 kMurder = 43,
65 kAssaultNPC = 44,
66 kMurderNPC = 45,
67 kPickpocketNPC = 46,
68 kStealFromNPC = 47,
70 kTrespass = 49,
76 kAlertIdle = 55,
77 kLostIdle = 56,
78 kNormalToAlert = 57,
79 kAlertToCombat = 58,
80 kNormalToCombat = 59,
81 kAlertToNormal = 60,
82 kCombatToNormal = 61,
83 kCombatToLost = 62,
84 kLostToNormal = 63,
85 kLostToCombat = 64,
87 kServiceRefusal = 66,
88 kRepair = 67,
89 kTravel = 68,
90 kTraining = 69,
91 kBarterExit = 70,
92 kRepairExit = 71,
93 kRecharge = 72,
94 kRechargeExit = 73,
95 kTrainingExit = 74,
96 kObserveCombat = 75,
97 kNoticeCorpse = 76,
98 kTimeToGo = 77,
99 kGoodBye = 78,
100 kHello = 79,
102 kShootBow = 81,
103 kZKeyObject = 82,
104 kJump = 83,
105 kKnockOverObject = 84,
106 kDestroyObject = 85,
108 kLockedObject = 87,
109 kPickpocketTopic = 88,
110 kPursueIdleTopic = 89,
111 kSharedInfo = 90,
114 kPlayerShout = 93,
115 kIdle = 94,
121 kOutofBreath = 100,
122 kCombatGrunt = 101,
124 };
125
129 };
130 static_assert(sizeof(DIALOGUE_DATA) == 0x4);
131
132 class TESTopic :
133 public TESForm, // 00
134 public TESFullName // 20
135 {
136 public:
137 inline static constexpr auto RTTI = RTTI_TESTopic;
138 inline static constexpr auto FORMTYPE = FormType::Dialogue;
139
141 {
142 enum RecordFlag : std::uint32_t
143 {
144 kDeleted = 1 << 5,
145 kIgnored = 1 << 12
146 };
147 };
148
149 ~TESTopic() override; // 00
150
151 // override (TESForm)
152 bool Load(TESFile* a_mod) override; // 06
153 void InitItemImpl() override; // 13
154 const char* GetFormEditorID() const override; // 32 - { return formEditorID.c_str(); }
155 bool SetFormEditorID(const char* a_str) override; // 33 - { bool result = formEditorID == a_str; formEditorID = a_str; return result; }
156 bool IsParentForm() override; // 34 - { return true; }
157 bool IsFormTypeChild(FormType a_type) override; // 36 - { return a_type == FormType::Info }
158
159 // override (TESFullName)
160 std::uint32_t GetFullNameLength() const override; // 04
161 [[nodiscard]] const char* GetFullName() const override; // 05
162
163 [[nodiscard]] float GetPriority() const;
164
165 // members
166 DIALOGUE_DATA data; // 30 - DATA
167 std::uint32_t priorityAndJournalIndex; // 34 - PNAM
169 TESQuest* ownerQuest; // 40 - QNAM
170 TESTopicInfo** topicInfos; // 48 - infoTopics[infoCount]
171 std::uint32_t numTopicInfos; // 50 - TIFC
172 std::uint32_t firstFileOffset; // 54
174 };
175 static_assert(sizeof(TESTopic) == 0x60);
176}
Definition: BGSDialogueBranch.h:10
Definition: TESFile.h:14
Definition: TESForm.h:34
Definition: TESFullName.h:9
Definition: TESQuest.h:189
Definition: TESTopic.h:135
const char * GetFullName() const override
TESQuest * ownerQuest
Definition: TESTopic.h:169
std::uint32_t priorityAndJournalIndex
Definition: TESTopic.h:167
bool IsFormTypeChild(FormType a_type) override
static constexpr auto RTTI
Definition: TESTopic.h:137
static constexpr auto FORMTYPE
Definition: TESTopic.h:138
TESTopicInfo ** topicInfos
Definition: TESTopic.h:170
DIALOGUE_DATA data
Definition: TESTopic.h:166
std::uint32_t numTopicInfos
Definition: TESTopic.h:171
BGSDialogueBranch * ownerBranch
Definition: TESTopic.h:168
float GetPriority() const
~TESTopic() override
bool IsParentForm() override
std::uint32_t GetFullNameLength() const override
void InitItemImpl() override
bool Load(TESFile *a_mod) override
const char * GetFormEditorID() const override
BSFixedString formEditorID
Definition: TESTopic.h:173
bool SetFormEditorID(const char *a_str) override
std::uint32_t firstFileOffset
Definition: TESTopic.h:172
Definition: TESTopicInfo.h:42
Definition: PCH.h:216
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_TESTopic
Definition: Offsets_RTTI.h:6078
FormType
Definition: FormTypes.h:139
Definition: TESTopic.h:12
stl::enumeration< Subtype, std::uint16_t > subtype
Definition: TESTopic.h:128
TopicFlag
Definition: TESTopic.h:14
Subtype
Definition: TESTopic.h:20
stl::enumeration< TopicFlag, std::uint8_t > topicFlags
Definition: TESTopic.h:126
stl::enumeration< DIALOGUE_TYPE, std::uint8_t > type
Definition: TESTopic.h:127
Definition: TESTopic.h:141
RecordFlag
Definition: TESTopic.h:143
@ kDeleted
Definition: TESTopic.h:144
@ kIgnored
Definition: TESTopic.h:145