conversation_template | conversation_actors | conversation_line_template
目录
conversation_template
conversation_actors
conversation_line_template
实例应用
conversation_template
- id:某段谈话的唯一编号
- FirstLineId:谈话开始的第一段话的编号,取值来源 ConversationLine.db2 的 ID 字段
- TextureKitId:谈话框的背景贴图编号,取值来源 UiTextureKit.db2 的 ID 字段
- Flags:取值如下
-
Name Flag Comments None 0x00 MultipleConversationType 0x01 IsTalkingHeadConversation 0x02 AllowWithoutSpawnedActor 0x03 - ScriptName:源码预设的脚本名
conversation_actors
- ConversationId:某段谈话的唯一编号,取值来源 conversation_template 的 ID 字段
- ConversationActorId:某段谈话参与者的编号
- ConversationActorGuid:某段谈话参与者的 guid,取值来源 creature 的 guid 字段
- Idx:某段谈话参与者的发言顺序编号
- CreatureId:谈话框架内显示的参与者的 entry,取值来源 creature_template 的 entry 字段
- 谈话参与者也可以是非世界对象
- CreatureDisplayInfoId:谈话参与者显示的视觉外观编号,取值来源 CreatureDisplayInfo.db2 的 DisplayID 字段
- NoActorObject:取值如下
-
Value Description 0 If WorldObject (ConversationActorGuid) is missing conversation is interrupted 1 If WorldObject (ConversationActorGuid) is missing conversation is continuing - ActivePlayerObject:取值如下
-
Value Description 0 CreatureID or WorldObject is actor for conversation 1 ActivePlayer is actor for conversation
conversation_line_template
- 某段谈话内其中一个对话的编号,取值来源 ConversationLine.db2 的 ID 字段
- UiCameraID:谈话显示的UI视角编号,取值来源 UiCamera.db2 的 ID 字段
- ActorIdx:取值链接 conversation_actors 的 Idx 字段
- Flags:取值如下
-
Value Name Description 0x0 None 0x1 CONVERSATION_LINE_FLAG_NOTIFY_STARTED Client will send CMSG_CONVERSATION_LINE_STARTED when it runs this line - ChatType:谈话类型,取值如下
-
enum ChatType {CHAT_TYPE_SAY = 0,CHAT_TYPE_YELL = 1,CHAT_TYPE_TEXT_EMOTE = 2,CHAT_TYPE_BOSS_EMOTE = 3,CHAT_TYPE_WHISPER = 4,CHAT_TYPE_BOSS_WHISPER = 5,CHAT_TYPE_ZONE_YELL = 6,CHAT_TYPE_END = 255 };
实例应用
-- Drustvar: Conversation script for Marshal Everit Reade-- Conversation
DELETE FROM `conversation_template` WHERE `Id` = 5667;
INSERT INTO `conversation_template` (`Id`, `FirstLineID`, `TextureKitId`, `VerifiedBuild`) VALUES
(5667, 12683, 0, 60257);DELETE FROM `conversation_actors` WHERE (`ConversationId`=5667 AND `Idx` IN (1,0));
INSERT INTO `conversation_actors` (`ConversationId`, `ConversationActorId`, `ConversationActorGuid`, `Idx`, `CreatureId`, `CreatureDisplayInfoId`, `NoActorObject`, `ActivePlayerObject`, `VerifiedBuild`) VALUES
(5667, 59853, 7002088, 1, 0, 0, 0, 0, 60257), -- Full: 0x20426CCD607A74800050CB000000B17A Creature/0 R4251/S20683 Map: 1643 (Kul Tiras) Entry: 125394 (Constable Henry Framer) Low: 45434
(5667, 61576, 7002090, 0, 0, 0, 0, 0, 60257); -- Full: 0x20426CCD607A72400050CB000080B17A Creature/0 R4251/S20683 Map: 1643 (Kul Tiras) Entry: 125385 (Marshal Everit Reade) Low: 8434042DELETE FROM `conversation_line_template` WHERE `Id` IN (12686, 12685, 12684, 12683);
INSERT INTO `conversation_line_template` (`Id`, `UiCameraID`, `ActorIdx`, `Flags`, `ChatType`, `VerifiedBuild`) VALUES
(12686, 0, 1, 1, 0, 60257),
(12685, 0, 1, 0, 0, 60257),
(12684, 0, 0, 0, 1, 60257),
(12683, 0, 0, 0, 0, 60257);-- Quest
DELETE FROM `quest_details` WHERE `ID` = 48111;
INSERT INTO `quest_details` (`ID`, `Emote1`, `Emote2`, `Emote3`, `Emote4`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `EmoteDelay4`, `VerifiedBuild`) VALUES
(48111, 1, 0, 0, 0, 0, 0, 0, 0, 60257); -- Trial by SuperstitionDELETE FROM `creature_queststarter` WHERE (`id`=125380 AND `quest`=48111);
INSERT INTO `creature_queststarter` (`id`, `quest`, `VerifiedBuild`) VALUES
(125380, 48111, 60257); -- Trial by Superstition offered by Lucille Waycrest
DELETE FROM `creature_questender` WHERE (`id`=125380 AND `quest`=48111);
INSERT INTO `creature_questender` (`id`, `quest`, `VerifiedBuild`) VALUES
(125380, 48111, 60257); -- Trial by Superstition ended by Lucille Waycrest-- Marshal Everit Reade SAI
SET @ENTRY := 125385;UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = @ENTRY;DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` = @ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `action_param7`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`, `Difficulties`) VALUES
(@ENTRY, 0, 0, 0, 20, 0, 100, 0, 48109, 0, 0, 0, 0, 143, 5667, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'On player rewarded quest The Woods Have Eyes (48109) - Rewarded player: Start conversation 5667', ''),
(@ENTRY, 0, 1, 0, 20, 0, 100, 0, 48110, 0, 0, 0, 0, 143, 5667, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'On player rewarded quest In Case of Ambush (48110) - Rewarded player: Start conversation 5667', '');DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 125385 AND `SourceId` = 0;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ConditionStringValue1`, `NegativeCondition`, `Comment`) VALUES
(22, 1, 125385, 0, 0, 47, 0, 48110, 64, 0, '', 0, 'Action invoker has In Case of Ambush (48110) in state rewarded'),
(22, 2, 125385, 0, 0, 47, 0, 48109, 64, 0, '', 0, 'Action invoker has The Woods Have Eyes (48109) in state rewarded');