TrinityCore
ConversationDataStore.h
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef ConversationDataStore_h__
19#define ConversationDataStore_h__
20
21#include "Define.h"
22#include "EnumFlag.h"
23#include "ObjectGuid.h"
24#include <variant>
25#include <vector>
26
28{
29 WorldObject = 0,
30 TalkingHead = 1
31};
32
34{
36};
37
39{
42};
43
45{
46};
47
49{
52};
53
55{
56 int32 Id = 0;
62};
63
65{
66 CONVERSATION_LINE_FLAG_NOTIFY_STARTED = 0x1 // Client will send CMSG_CONVERSATION_LINE_STARTED when it runs this line
67};
68
70{
71 uint32 Id; // Link to ConversationLine.db2
72 uint32 UiCameraID; // Link to UiCamera.db2
73 uint8 ActorIdx; // Index from conversation_actors
76};
77
79{
80 None = 0x00,
81 MultipleConversationType = 0x01, // NYI purpose unknown
82 IsTalkingHeadConversation = 0x02, // implicitly implemented when conversation_actors.ActivePlayerObject == 0 && conversation_actors.NoActorObject == 0 && conversation_actors.ConversationActorGuid == 0
84};
85
87
89{
91 uint32 FirstLineId; // Link to ConversationLine.db2
92 uint32 TextureKitId; // Background texture
94
95 std::vector<ConversationActorTemplate> Actors;
96 std::vector<ConversationLineTemplate const*> Lines;
97
99};
100
102{
103public:
104 void LoadConversationTemplates();
105
106 ConversationTemplate const* GetConversationTemplate(uint32 conversationId) const;
107 ConversationLineTemplate const* GetConversationLineTemplate(uint32 conversationLineId) const;
108
109 static ConversationDataStore* Instance();
110};
111
112#define sConversationDataStore ConversationDataStore::Instance()
113
114#endif // ConversationDataStore_h__
DEFINE_ENUM_FLAG(ConversationFlags)
ConversationActorType
ConversationLineFlags
@ CONVERSATION_LINE_FLAG_NOTIFY_STARTED
ConversationFlags
#define TC_GAME_API
Definition: Define.h:123
uint8_t uint8
Definition: Define.h:144
int32_t int32
Definition: Define.h:138
uint32_t uint32
Definition: Define.h:142
uint64 LowType
Definition: ObjectGuid.h:278
std::variant< ConversationActorWorldObjectTemplate, ConversationActorNoObjectTemplate, ConversationActorActivePlayerTemplate, ConversationActorTalkingHeadTemplate > Data
EnumFlag< ConversationFlags > Flags
std::vector< ConversationLineTemplate const * > Lines
std::vector< ConversationActorTemplate > Actors