aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/master/2018_08_24_00_world.sql6
-rw-r--r--src/server/game/Globals/ConversationDataStore.cpp6
-rw-r--r--src/server/game/Globals/ConversationDataStore.h10
-rw-r--r--src/server/game/Server/Protocol/Opcodes.cpp1
-rw-r--r--src/server/game/Server/Protocol/Opcodes.h1
5 files changed, 19 insertions, 5 deletions
diff --git a/sql/updates/world/master/2018_08_24_00_world.sql b/sql/updates/world/master/2018_08_24_00_world.sql
new file mode 100644
index 00000000000..9805a86fa82
--- /dev/null
+++ b/sql/updates/world/master/2018_08_24_00_world.sql
@@ -0,0 +1,6 @@
+ALTER TABLE `conversation_line_template` ADD `Flags` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `ActorIdx`;
+UPDATE `conversation_line_template` SET `Flags`=(`ActorIdx`>>8);
+UPDATE `conversation_line_template` SET `ActorIdx`=`ActorIdx`&0xFF;
+ALTER TABLE `conversation_line_template`
+ CHANGE `ActorIdx` `ActorIdx` tinyint(3) unsigned NOT NULL DEFAULT '0' AFTER `UiCameraID`,
+ DROP `Unk`;
diff --git a/src/server/game/Globals/ConversationDataStore.cpp b/src/server/game/Globals/ConversationDataStore.cpp
index d072cefeae0..af2a416e000 100644
--- a/src/server/game/Globals/ConversationDataStore.cpp
+++ b/src/server/game/Globals/ConversationDataStore.cpp
@@ -62,7 +62,7 @@ void ConversationDataStore::LoadConversationTemplates()
TC_LOG_INFO("server.loading", ">> Loaded 0 Conversation actor templates. DB table `conversation_actor_template` is empty.");
}
- if (QueryResult lineTemplates = WorldDatabase.Query("SELECT Id, StartTime, UiCameraID, ActorIdx, Unk FROM conversation_line_template"))
+ if (QueryResult lineTemplates = WorldDatabase.Query("SELECT Id, StartTime, UiCameraID, ActorIdx, Flags FROM conversation_line_template"))
{
uint32 oldMSTime = getMSTime();
@@ -82,8 +82,8 @@ void ConversationDataStore::LoadConversationTemplates()
conversationLine.Id = id;
conversationLine.StartTime = fields[1].GetUInt32();
conversationLine.UiCameraID = fields[2].GetUInt32();
- conversationLine.ActorIdx = fields[3].GetUInt16();
- conversationLine.Unk = fields[4].GetUInt16();
+ conversationLine.ActorIdx = fields[3].GetUInt8();
+ conversationLine.Flags = fields[4].GetUInt8();
}
while (lineTemplates->NextRow());
diff --git a/src/server/game/Globals/ConversationDataStore.h b/src/server/game/Globals/ConversationDataStore.h
index e8601be3f21..e6e750455d5 100644
--- a/src/server/game/Globals/ConversationDataStore.h
+++ b/src/server/game/Globals/ConversationDataStore.h
@@ -23,6 +23,11 @@
#include <vector>
+enum ConversationLineFlags
+{
+ CONVERSATION_LINE_FLAG_NOTIFY_STARTED = 0x1 // Client will send CMSG_CONVERSATION_LINE_STARTED when it runs this line
+};
+
#pragma pack(push, 1)
struct ConversationActorTemplate
{
@@ -36,8 +41,9 @@ struct ConversationLineTemplate
uint32 Id; // Link to ConversationLine.db2
uint32 StartTime; // Time in ms after conversation creation the line is displayed
uint32 UiCameraID; // Link to UiCamera.db2
- uint16 ActorIdx; // Index from conversation_actors
- uint16 Unk;
+ uint8 ActorIdx; // Index from conversation_actors
+ uint8 Flags;
+ uint16 Padding;
};
#pragma pack(pop)
diff --git a/src/server/game/Server/Protocol/Opcodes.cpp b/src/server/game/Server/Protocol/Opcodes.cpp
index 77690ba7354..6f528dce8dd 100644
--- a/src/server/game/Server/Protocol/Opcodes.cpp
+++ b/src/server/game/Server/Protocol/Opcodes.cpp
@@ -344,6 +344,7 @@ void OpcodeTable::Initialize()
DEFINE_HANDLER(CMSG_CONNECT_TO_FAILED, STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_EarlyProccess);
DEFINE_HANDLER(CMSG_CONTRIBUTION_CONTRIBUTE, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL);
DEFINE_HANDLER(CMSG_CONTRIBUTION_GET_STATE, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL);
+ DEFINE_HANDLER(CMSG_CONVERSATION_LINE_STARTED, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL);
DEFINE_HANDLER(CMSG_CONVERT_CONSUMPTION_TIME, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::Handle_NULL);
DEFINE_HANDLER(CMSG_CONVERT_RAID, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleConvertRaidOpcode);
DEFINE_HANDLER(CMSG_CREATE_CHARACTER, STATUS_AUTHED, PROCESS_THREADUNSAFE, &WorldSession::HandleCharCreateOpcode);
diff --git a/src/server/game/Server/Protocol/Opcodes.h b/src/server/game/Server/Protocol/Opcodes.h
index 49ca92b7004..c39cd5ca314 100644
--- a/src/server/game/Server/Protocol/Opcodes.h
+++ b/src/server/game/Server/Protocol/Opcodes.h
@@ -243,6 +243,7 @@ enum OpcodeClient : uint16
CMSG_CONNECT_TO_FAILED = 0x35D4,
CMSG_CONTRIBUTION_CONTRIBUTE = 0x3558,
CMSG_CONTRIBUTION_GET_STATE = 0x3559,
+ CMSG_CONVERSATION_LINE_STARTED = 0x354A,
CMSG_CONVERT_CONSUMPTION_TIME = 0x36F9,
CMSG_CONVERT_RAID = 0x364E,
CMSG_CREATE_CHARACTER = 0x3643,