Visitar URL original
Scripts/HallOfAwakening: Scripted init. conversation event for Quest:… · TrinityCore/TrinityCore@5a58175 · GitHub
Skip to content

Commit 5a58175

Browse files
authored
Scripts/HallOfAwakening: Scripted init. conversation event for Quest: "Who Am I?" (#32113)
1 parent 3c8c67b commit 5a58175

3 files changed

Lines changed: 177 additions & 0 deletions

File tree

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
SET @CGUID := 10006986;
2+
3+
-- Creature
4+
DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+1;
5+
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `PhaseId`, `PhaseGroup`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `VerifiedBuild`) VALUES
6+
(@CGUID+0, 224782, 2739, 15342, 15380, '0', 23761, 0, 0, 0, 1434.1875, -253.083328247070312, 8.140850067138671875, 1.595028400421142578, 120, 0, 0, 0, NULL, NULL, NULL, NULL, 70575), -- Dawn (Area: Awakening Machine - Difficulty: 0) CreateObject1
7+
(@CGUID+1, 224783, 2739, 15342, 15380, '0', 23761, 0, 0, 0, 1432.3333740234375, -253.154510498046875, 8.17717742919921875, 1.7108689546585083, 120, 0, 0, 0, NULL, NULL, NULL, NULL, 70575); -- Foreman Uzjax (Area: Awakening Machine - Difficulty: 0) CreateObject1
8+
9+
UPDATE `creature` SET `StringId` = 'CloneTarget' WHERE `guid` IN (@CGUID+0, @CGUID+1);
10+
11+
-- Template
12+
UPDATE `creature_template` SET `faction`=35, `BaseAttackTime`=2000, `unit_flags2`=0x800 WHERE `entry`=224782; -- Dawn
13+
UPDATE `creature_template` SET `faction`=3398, `BaseAttackTime`=2000, `unit_flags2`=0x800 WHERE `entry`=224783; -- Foreman Uzjax
14+
15+
-- Difficulty
16+
UPDATE `creature_template_difficulty` SET `ContentTuningID`=782, `StaticFlags1`=0x10000000, `VerifiedBuild`=70575 WHERE (`Entry`=224782 AND `DifficultyID`=0); -- 224782 (Dawn) - CanSwim
17+
UPDATE `creature_template_difficulty` SET `ContentTuningID`=2803, `StaticFlags1`=0x10000000, `VerifiedBuild`=70575 WHERE (`Entry`=224783 AND `DifficultyID`=0); -- 224783 (Foreman Uzjax) - CanSwim
18+
19+
-- Phase
20+
DELETE FROM `phase_name` WHERE `ID` = 23761;
21+
INSERT INTO `phase_name` (`ID`, `Name`) VALUES
22+
(23761, 'Cosmetic - See Dawn and Foreman Uzjax');
23+
24+
DELETE FROM `phase_area` WHERE `AreaId`= 15380 AND `PhaseId` = 23761;
25+
INSERT INTO `phase_area` (`AreaId`, `PhaseId`, `Comment`) VALUES
26+
(15380, 23761, 'See Dawn and Foreman Uzjax');
27+
28+
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=26 AND `SourceGroup` = 23761 AND `SourceEntry`=0;
29+
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `Comment`) VALUE
30+
(26, 23761, 0, 0, 0, 47, 0, 79200, 2|8|64, 0, 0, 'Apply Phase 23761 if Quest 79200 is in progress | complete | rewarded');
31+
32+
-- Correct QuestID in last condition
33+
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=26 AND `SourceGroup` = 23759 AND `SourceEntry`=0;
34+
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `Comment`) VALUE
35+
(26, 23759, 0, 0, 0, 47, 0, 79200, 2|8|64, 0, 1, 'Apply Phase 23759 if Quest 79200 is not in progress | complete | rewarded');
36+
37+
-- Conversation
38+
DELETE FROM `conversation_template` WHERE `Id`=25327;
39+
INSERT INTO `conversation_template` (`Id`, `FirstLineID`, `TextureKitId`, `VerifiedBuild`) VALUES
40+
(25327, 68940, 0, 70575);
41+
42+
UPDATE `conversation_template` SET `ScriptName` = 'conversation_quest_who_am_i';
43+
44+
DELETE FROM `conversation_actors` WHERE (`ConversationId`=25327 AND `Idx` IN (1,0));
45+
INSERT INTO `conversation_actors` (`ConversationId`, `ConversationActorId`, `Idx`, `CreatureId`, `CreatureDisplayInfoId`, `NoActorObject`, `ActivePlayerObject`, `VerifiedBuild`) VALUES
46+
(25327, 98762, 1, 221839, 118887, 0, 0, 70575),
47+
(25327, 98764, 0, 221841, 114674, 0, 0, 70575);
48+
49+
DELETE FROM `conversation_line_template` WHERE `Id` IN (68939, 68940);
50+
INSERT INTO `conversation_line_template` (`Id`, `UiCameraID`, `ActorIdx`, `Flags`, `ChatType`, `VerifiedBuild`) VALUES
51+
(68939, 1809, 1, 0, 0, 70575),
52+
(68940, 1808, 0, 0, 0, 70575);
53+
54+
-- Dawn smart ai
55+
SET @ENTRY := 221839;
56+
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = @ENTRY;
57+
DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` = @ENTRY;
58+
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
59+
(@ENTRY, 0, 0, 0, 19, 0, 100, 0, 79200, 0, 0, 0, 0, 143, 25327, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'On player accepted quest Who am I? (79200) - Player who accepted quest: Start conversation 25327', '');
60+
61+
-- Creature 224782 smart ai
62+
SET @ENTRY := 224782;
63+
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = @ENTRY;
64+
DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` = @ENTRY;
65+
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
66+
(@ENTRY, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 53, 0, 22478200, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'On just summoned - Self: Start path #22478200, walk, do not repeat, Passive', ''),
67+
(@ENTRY, 0, 1, 0, 58, 0, 100, 0, 3, 22478200, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'On waypoint 3 of path 22478200 ended - Self: Despawn instantly', '');
68+
69+
-- Creature 224783 smart ai
70+
SET @ENTRY := 224783;
71+
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = @ENTRY;
72+
DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` = @ENTRY;
73+
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
74+
(@ENTRY, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 53, 0, 22478300, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'On just summoned - Self: Start path #22478300, walk, do not repeat, Passive', ''),
75+
(@ENTRY, 0, 1, 0, 58, 0, 100, 0, 3, 22478300, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'On waypoint 3 of path 22478300 ended - Self: Despawn instantly', '');
76+
77+
-- Path for Dawn
78+
SET @ENTRY := 224782;
79+
SET @PATHOFFSET := 0;
80+
SET @PATH := @ENTRY * 100 + @PATHOFFSET;
81+
DELETE FROM `waypoint_path` WHERE `PathId`= @PATH;
82+
INSERT INTO `waypoint_path` (`PathId`, `MoveType`, `Flags`, `Velocity`, `Comment`) VALUES
83+
(@PATH, 0, 0x0, NULL, 'Dawn - Scripted Path');
84+
85+
DELETE FROM `waypoint_path_node` WHERE `PathId`= @PATH;
86+
INSERT INTO `waypoint_path_node` (`PathId`, `NodeId`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `Delay`) VALUES
87+
(@PATH, 0, 1435.9567, -262.17883, 10.993773, NULL, 0),
88+
(@PATH, 1, 1434.3264, -260.70834, 10.993773, NULL, 0),
89+
(@PATH, 2, 1434.481, -259.19272, 10.952013, NULL, 0),
90+
(@PATH, 3, 1434.1875, -253.08333, 8.412861, NULL, 0);
91+
92+
-- Path for Foreman Uzjax
93+
SET @ENTRY := 224783;
94+
SET @PATHOFFSET := 0;
95+
SET @PATH := @ENTRY * 100 + @PATHOFFSET;
96+
DELETE FROM `waypoint_path` WHERE `PathId`= @PATH;
97+
INSERT INTO `waypoint_path` (`PathId`, `MoveType`, `Flags`, `Velocity`, `Comment`) VALUES
98+
(@PATH, 0, 0x0, NULL, 'Foreman Uzjax - Scripted Path');
99+
100+
DELETE FROM `waypoint_path_node` WHERE `PathId`= @PATH;
101+
INSERT INTO `waypoint_path_node` (`PathId`, `NodeId`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `Delay`) VALUES
102+
(@PATH, 0, 1437.724, -263.50522, 10.790649, NULL, 0),
103+
(@PATH, 1, 1431.5452, -261.45834, 10.993773, NULL, 0),
104+
(@PATH, 2, 1431.3438, -259.52258, 10.945606, NULL, 0),
105+
(@PATH, 3, 1432.3334, -253.15451, 8.441866, NULL, 0);
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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+
#include "Containers.h"
19+
#include "Conversation.h"
20+
#include "ConversationAI.h"
21+
#include "CreatureAI.h"
22+
#include "CreatureAIImpl.h"
23+
#include "MotionMaster.h"
24+
#include "ObjectAccessor.h"
25+
#include "PhasingHandler.h"
26+
#include "ScriptMgr.h"
27+
#include "ScriptedCreature.h"
28+
#include "TemporarySummon.h"
29+
30+
namespace Scripts::KhazAlgar::HallOfAwakening
31+
{
32+
namespace Creatures
33+
{
34+
static constexpr uint32 DawnStairs = 224782;
35+
static constexpr uint32 ForemanUzjaxStairs = 224783;
36+
}
37+
38+
constexpr Position DawnInitCloneSpawnPos = { 1441.6336f, -261.7257f, 11.0389f, 4.623f };
39+
constexpr Position ForemasterUjaxInitCloneSpawnPos = { 1443.10241f, -261.6111f, 11.0424f, 4.7068f };
40+
41+
// 25327 - Conversation
42+
class conversation_quest_who_am_i : public ConversationAI
43+
{
44+
public:
45+
using ConversationAI::ConversationAI;
46+
47+
void OnCreate(Unit* creator) override
48+
{
49+
if (Creature* dawnObject = creator->FindNearestCreatureWithOptions(20.0f, { .CreatureId = Creatures::DawnStairs, .StringId = "CloneTarget", .IgnorePhases = true }))
50+
dawnObject->SummonPersonalClone(DawnInitCloneSpawnPos, TEMPSUMMON_MANUAL_DESPAWN, 0s, 0, 0, creator->ToPlayer());
51+
52+
if (Creature* foremanUzjaxObject = creator->FindNearestCreatureWithOptions(20.0f, { .CreatureId = Creatures::ForemanUzjaxStairs, .StringId = "CloneTarget", .IgnorePhases = true }))
53+
foremanUzjaxObject->SummonPersonalClone(ForemasterUjaxInitCloneSpawnPos, TEMPSUMMON_MANUAL_DESPAWN, 0s, 0, 0, creator->ToPlayer());
54+
55+
conversation->Start();
56+
}
57+
};
58+
}
59+
60+
void AddSC_zone_hall_of_awakening()
61+
{
62+
using namespace Scripts::KhazAlgar::HallOfAwakening;
63+
64+
// Conversations
65+
RegisterConversationAI(conversation_quest_who_am_i);
66+
}

‎src/server/scripts/KhazAlgar/khaz_algar_script_loader.cpp‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ void AddSC_zone_dornogal();
2323
// Zone Isle Of Dorn
2424
void AddSC_zone_isle_of_dorn();
2525

26+
// Zone Halls of Awakening
27+
void AddSC_zone_hall_of_awakening();
28+
2629
// Campaign: Visions of a Shadowed Sun
2730
void AddSC_campaign_visions_of_a_shadowed_sun();
2831

@@ -50,6 +53,9 @@ void AddKhazAlgarScripts()
5053
// Dornogal
5154
AddSC_zone_dornogal();
5255

56+
// Halls of Awakening
57+
AddSC_zone_hall_of_awakening();
58+
5359
// Zone Isle of Dorn
5460
AddSC_zone_isle_of_dorn();
5561

0 commit comments

Comments
 (0)