diff options
author | Malcrom <malcromdev@gmail.com> | 2023-12-31 22:37:52 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-01 03:37:52 +0100 |
commit | e2e2357b0088a3955e941e8807fab002f51eca61 (patch) | |
tree | 56eefc3d63e9beefc435dd45852137bf315be9f9 | |
parent | 78012dadf2bb04398cbe3630d07762bffff82c8b (diff) |
Scripts/Durotar: Implemented several Darkspear Training Grounds quests (#29507)
* The Basics: Hitting things
* Proving Pit
* added start quest for monks
* also fixed Zuni spawn
* also fixed cosmetics for Tiki Targets
* also fixed questchains of all classes up to Darkspear Hold
-rw-r--r-- | sql/updates/world/master/2024_01_01_00_world.sql | 327 | ||||
-rw-r--r-- | src/server/scripts/Kalimdor/zone_durotar.cpp | 506 |
2 files changed, 833 insertions, 0 deletions
diff --git a/sql/updates/world/master/2024_01_01_00_world.sql b/sql/updates/world/master/2024_01_01_00_world.sql new file mode 100644 index 00000000000..79a86ad2991 --- /dev/null +++ b/sql/updates/world/master/2024_01_01_00_world.sql @@ -0,0 +1,327 @@ +-- Set by TC Devs +SET @CGUID := 3000463; -- 3 needed +SET @NPCTEXTID := 530002; -- 3 needed + +-- Darkspear Training Grounds + +DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID AND @CGUID+2; +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `VerifiedBuild`) VALUES +(@CGUID,63310,1,6453,4865,'0',0,0,-1,0,0,-1149.3906,-5441.252,12.12974,0.0860126,120,0,0,1,0,0,NULL,NULL,52607), -- Zabrax <Monk Trainer> +(@CGUID+1,63309,1,6453,4865,'0',0,0,-1,0,0,-1144.7935,-5441.1426,12.064628,3.116011,120,0,0,1,0,0,NULL,NULL,52607), -- Tsu the Wanderer +(@CGUID+2,90113,1,6453,4865,'0',0,0,-1,0,0,-1310.9911,-5557.339,21.042166,5.863887,120,0,0,1,0,0,NULL,NULL,52607); -- Ardsami + +-- Troll Trainer Gossip +DELETE FROM `npc_text` WHERE `ID` BETWEEN @NPCTEXTID+0 AND @NPCTEXTID+2; +INSERT INTO `npc_text` (`ID`, `Probability0`, `Probability1`, `Probability2`, `Probability3`, `Probability4`, `Probability5`, `Probability6`, `Probability7`, `BroadcastTextId0`, `BroadcastTextId1`, `BroadcastTextId2`, `BroadcastTextId3`, `BroadcastTextId4`, `BroadcastTextId5`, `BroadcastTextId6`, `BroadcastTextId7`, `VerifiedBuild`) VALUES +(@NPCTEXTID+0, 1, 0, 0, 0, 0, 0, 0, 0, 42493, 0, 0, 0, 0, 0, 0, 0, 52649), -- Voldreka <Warlock Trainer> Entry: 42618 +(@NPCTEXTID+1, 1, 0, 0, 0, 0, 0, 0, 0, 37957, 0, 0, 0, 0, 0, 0, 0, 52649), -- Legati <Rogue Trainer> Entry: 38244 +(@NPCTEXTID+2, 1, 0, 0, 0, 0, 0, 0, 0, 37932, 0, 0, 0, 0, 0, 0, 0, 52649); -- Nekali <Shaman Trainer> Entry: 38242 + +UPDATE `creature_template` SET `AIName` = "", `ScriptName` = "npc_nortet" WHERE `entry` = 38037; +UPDATE `creature_template` SET `AIName` = "", `ScriptName` = "npc_tunari" WHERE `entry` = 38245; +UPDATE `creature_template` SET `AIName` = "", `ScriptName` = "npc_seratha" WHERE `entry` = 38246; +UPDATE `creature_template` SET `AIName` = "", `ScriptName` = "npc_legati" WHERE `entry` = 38244; +UPDATE `creature_template` SET `AIName` = "", `ScriptName` = "npc_nekali" WHERE `entry` = 38242; +UPDATE `creature_template` SET `AIName` = "", `ScriptName` = "npc_ertezza" WHERE `entry` = 38247; +UPDATE `creature_template` SET `AIName` = "", `ScriptName` = "npc_zentabra" WHERE `entry` = 38243; +UPDATE `creature_template` SET `AIName` = "", `ScriptName` = "npc_voldreka" WHERE `entry` = 42618; +UPDATE `creature_template` SET `AIName` = "", `ScriptName` = "npc_zabrax" WHERE `entry` = 63310; +UPDATE `creature_template` SET `AIName` = "", `ScriptName` = "npc_durotar_tiki_target" WHERE `entry` = 38038; +UPDATE `creature_template` SET `AIName` = "", `ScriptName` = "npc_darkspear_jailor" WHERE `entry` = 39062; +UPDATE `creature_template` SET `AIName` = "", `ScriptName` = "npc_captive_spitescale_scout" WHERE `entry` = 38142; + +UPDATE `creature` SET `StringId`="darkspear_jailor_one" WHERE `guid`=309155; +UPDATE `creature` SET `StringId`="darkspear_jailor_two" WHERE `guid`=309082; +UPDATE `creature` SET `StringId`="captive_spitescale_scout_one" WHERE `guid`=309164; +UPDATE `creature` SET `StringId`="captive_spitescale_scout_two" WHERE `guid`=309093; + +DELETE FROM `creature_text` WHERE `CreatureID` IN (39062,38142); +INSERT INTO `creature_text` (`CreatureID`,`GroupID`,`ID`,`Text`,`Type`,`Language`,`Probability`,`Emote`,`Duration`,`Sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES +(39062, 0, 0, 'Get in the pit and show us your stuff, $G boy:girl;.', 12, 0, 100, 1, 0, 0, 0, 0, 'Darkspear Jailor'), +(38142, 0, 0, 'They sssend you to your death, youngling.', 12, 0, 100, 0, 0, 0, 0, 0, 'Captive Spitescale Scout'); + +-- Pathing for Darkspear Jailor One +SET @NPC := 309155; +SET @PATH := @NPC * 100; +DELETE FROM `waypoint_data` WHERE `id` IN (@PATH, @PATH+1); +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`wpguid`) VALUES +(@PATH,1,-1136.5938, -5425.422, 13.735447,NULL,0,1,0), +(@PATH,2,-1135.8698, -5416.757, 13.26898,NULL,0,1,0), +(@PATH+1,1,-1137.3177, -5429.087, 13.701913,NULL,0,0,0), +(@PATH+1,2,-1143.191, -5429.9634, 13.863617, 1.85005,0,0,0); + +-- Pathing for Darkspear Jailor Two +SET @NPC := 309082; +SET @PATH := @NPC * 100; +DELETE FROM `waypoint_data` WHERE `id` IN (@PATH, @PATH+1); +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`wpguid`) VALUES +(@PATH,1,-1158.1224,-5524.829,12.020827,NULL,0,1,0), +(@PATH,2,-1157.1224,-5521.829,12.270827,NULL,0,1,0), +(@PATH,3,-1153.5295,-5518.6094,12.005672,NULL,0,1,0), +(@PATH+1,1,-1156.4045,-5521.3184,12.229713,NULL,0,0,0), +(@PATH+1,2,-1157.6545,-5522.8184,12.229713,NULL,0,0,0), +(@PATH+1,3,-1159.2795,-5530.028,11.953753, 6.19592,0,0,0); + +-- The Rise of the Darkspear "Monk" +DELETE FROM `creature_queststarter` WHERE `id`=37951 AND `quest` = 31159; +INSERT INTO `creature_queststarter` (`id`, `quest`, `VerifiedBuild`) VALUES +(37951, 31159, 52607); + +-- Fix Monk quest chain +DELETE FROM `quest_template_addon` WHERE `ID` IN (31159,31158,31160,31161,31163); +INSERT INTO `quest_template_addon` (`ID`,`AllowableClasses`,`PrevQuestID`,`NextQuestID`) VALUES +(31159,512,0,0), +(31158,512,31159,0), +(31160,512,31158,0), +(31161,512,31160,0), +(31163,512,31161,0); + +DELETE FROM `creature_text` WHERE `CreatureID` IN (38037,38245,38246,38244,38242,38247,38243,42618,63310); +INSERT INTO `creature_text` (`CreatureID`,`GroupID`,`ID`,`Text`,`Type`,`Language`,`Probability`,`Emote`,`Duration`,`Sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES +-- Nortet "Warrior Trainer" +(38037, 0, 0, 'Not bad, $n. Not bad.', 12, 0, 100, 0, 0, 0, 37928, 0, 'Nortet'), +(38037, 1, 0, 'Well done, $n!', 12, 0, 100, 0, 0, 0, 37898, 0, 'Nortet'), +-- Tunari "Priest Trainer" +(38245, 0, 0, 'Not bad, $n. Not bad.', 12, 0, 100, 0, 0, 0, 37928, 0, 'Tunari'), +(38245, 1, 0, 'Well done, $n!', 12, 0, 100, 0, 0, 0, 37898, 0, 'Tunari'), +-- Seratha "Mage Trainer" +(38246, 0, 0, 'Not bad, $n. Not bad.', 12, 0, 100, 0, 0, 0, 37928, 0, 'Seratha'), +(38246, 1, 0, 'Well done, $n!', 12, 0, 100, 0, 0, 0, 37898, 0, 'Seratha'), +-- Legati "Rogue Trainer" +(38244, 0, 0, 'Not bad, $n. Not bad.', 12, 0, 100, 0, 0, 0, 37928, 0, 'Legati'), +(38244, 1, 0, 'Well done, $n!', 12, 0, 100, 0, 0, 0, 37898, 0, 'Legati'), +-- Nekali "Shaman Trainer" +(38242, 0, 0, 'Not bad, $n. Not bad.', 12, 0, 100, 0, 0, 0, 37928, 0, 'Nekali'), +(38242, 1, 0, 'Well done, $n!', 12, 0, 100, 0, 0, 0, 37898, 0, 'Nekali'), +-- Ertezza "Hunter Trainer" +(38247, 0, 0, 'Not bad, $n. Not bad.', 12, 0, 100, 0, 0, 0, 37928, 0, 'Ertezza'), +(38247, 1, 0, 'Well done, $n!', 12, 0, 100, 0, 0, 0, 37898, 0, 'Ertezza'), +-- Zentabra "Druid Trainer" +(38243, 0, 0, 'Not bad, $n. Not bad.', 12, 0, 100, 0, 0, 0, 37928, 0, 'Zentabra'), +(38243, 1, 0, 'Well done, $n!', 12, 0, 100, 0, 0, 0, 37898, 0, 'Zentabra'), +-- Voldreka "Warlock Trainer" +(42618, 0, 0, 'Not bad, $n. Not bad.', 12, 0, 100, 0, 0, 0, 37928, 0, 'Voldreka'), +(42618, 1, 0, 'Well done, $n!', 12, 0, 100, 0, 0, 0, 37898, 0, 'Voldreka'), +-- Zabrax "Monk Trainer" +(63310, 0, 0, 'Not bad, $n. Not bad.', 12, 0, 100, 0, 0, 0, 37928, 0, 'Zabrax'), +(63310, 1, 0, 'Well done, $n!', 12, 0, 100, 0, 0, 0, 37898, 0, 'Zabrax'); + +-- Warrior Quest +UPDATE `quest_template_addon` SET `ScriptName` = "quest_the_basics_hitting_things_warrior" WHERE `ID` = 24639; +UPDATE `quest_template_addon` SET `ScriptName` = "quest_proving_pit_warrior" WHERE `ID` = 24642; +-- Priest Quest +UPDATE `quest_template_addon` SET `ScriptName` = "quest_the_basics_hitting_things_priest" WHERE `ID` = 24783; +UPDATE `quest_template_addon` SET `ScriptName` = "quest_proving_pit_priest" WHERE `ID` = 24786; +-- Mage Quest +UPDATE `quest_template_addon` SET `ScriptName` = "quest_the_basics_hitting_things_mage" WHERE `ID` = 24751; +UPDATE `quest_template_addon` SET `ScriptName` = "quest_proving_pit_mage" WHERE `ID` = 24754; +-- Rogue Quest +UPDATE `quest_template_addon` SET `ScriptName` = "quest_the_basics_hitting_things_rogue" WHERE `ID` = 24771; +UPDATE `quest_template_addon` SET `ScriptName` = "quest_proving_pit_rogue" WHERE `ID` = 24774; +-- Shaman Quest +UPDATE `quest_template_addon` SET `ScriptName` = "quest_the_basics_hitting_things_shaman" WHERE `ID` = 24759; +UPDATE `quest_template_addon` SET `ScriptName` = "quest_proving_pit_shaman" WHERE `ID` = 24762; +-- Hunter Quest +UPDATE `quest_template_addon` SET `ScriptName` = "quest_the_basics_hitting_things_hunter" WHERE `ID` = 24777; +UPDATE `quest_template_addon` SET `ScriptName` = "quest_proving_pit_hunter" WHERE `ID` = 24780; +-- Druid Quest +UPDATE `quest_template_addon` SET `ScriptName` = "quest_the_basics_hitting_things_druid" WHERE `ID` = 24765; +UPDATE `quest_template_addon` SET `ScriptName` = "quest_proving_pit_druid" WHERE `ID` = 24768; +-- Warlock Quest +UPDATE `quest_template_addon` SET `ScriptName` = "quest_the_basics_hitting_things_warlock" WHERE `ID` = 26273; +UPDATE `quest_template_addon` SET `ScriptName` = "quest_proving_pit_warlock" WHERE `ID` = 26276; +-- Monk Quest +UPDATE `quest_template_addon` SET `ScriptName` = "quest_the_basics_hitting_things_monk" WHERE `ID` = 31158; +UPDATE `quest_template_addon` SET `ScriptName` = "quest_proving_pit_monk" WHERE `ID` = 31161; + +DELETE FROM `spell_script_names` WHERE `spell_id` IN (91404); +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(91404,'spell_durotar_summon_zuni'); + +-- Old spell has been replaced +DELETE FROM `playercreateinfo_cast_spell` WHERE spell IN (71033,91404); +INSERT INTO `playercreateinfo_cast_spell` (`raceMask`,`classMask`,`createMode`,`spell`,`note`) VALUES +(128,2015,0,91404,"Troll - Summon Zuni (Lvl 1)"); + +-- Fix Warrior questline +UPDATE `quest_template_addon` SET `PrevQuestID`=24642 WHERE `ID`=24643; +-- Fix Priest questline +UPDATE `quest_template_addon` SET `PrevQuestID`=24786 WHERE `ID`=24787; +DELETE FROM `creature_queststarter` WHERE `quest` = 24784; +DELETE FROM `disables` WHERE `sourceType` = 1 AND `entry` = 24784; +INSERT INTO `disables` (`sourceType`,`entry`,`flags`,`comment`) VALUES +(1,24784,0,"Deprecated quest: Learnin' tha Word"); +-- Fix mage questline +UPDATE `quest_template_addon` SET `PrevQuestID`=24754 WHERE `ID`=24755; +-- Fix rogue questline +UPDATE `quest_template_addon` SET `PrevQuestID`=24774 WHERE `ID`=24775; +-- Fix shaman questline +UPDATE `quest_template_addon` SET `PrevQuestID`=24762 WHERE `ID`=24763; +-- Fix Hunter questline +UPDATE `quest_template_addon` SET `PrevQuestID`=24780 WHERE `ID`=24781; +-- Fix Druid questline +UPDATE `quest_template_addon` SET `PrevQuestID`=24768 WHERE `ID`=24769; +-- Fix Warlock questline +UPDATE `quest_template_addon` SET `PrevQuestID`=26276 WHERE `ID`=26277; + +-- Condition for Gossip menu option allow Monk to do Proving Pit quest +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=10974 AND `ElseGroup`=9; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 10974, 1, 0, 9, 8, 0, 31161, 0, 0, 1, 0, 0, '', 'Show gossip menu 10974 option id 1 if quest Proving Pit has not been rewarded.'), +(15, 10974, 1, 0, 9, 47, 0, 31161, 10, 0, 0, 0, 0, '', 'Show gossip menu 10974 option id 1 if quest Proving Pit has been taken.'); + +-- Add missing gossip menu for Jailor +DELETE FROM `gossip_menu` WHERE `MenuID`=10973; +INSERT INTO `gossip_menu` (`MenuID`,`TextID`,`VerifiedBuild`) VALUES +(10973,15252,50000); + +-- Prevent player from stopping Jailor movement when opening gossip +DELETE FROM `creature_template_movement` WHERE `CreatureId`= 39062; +INSERT INTO `creature_template_movement` (`CreatureId`,`Ground`,`Swim`,`Flight`,`Rooted`,`Chase`,`Random`,`InteractionPauseTimer`) VALUES +(39062,1,0,0,0,0,0,0); + +-- Nortet Warrior trainer Entry: 38037 +DELETE FROM `gossip_menu` WHERE `MenuID`=14182; +INSERT INTO `gossip_menu` (`MenuID`, `TextID`, `VerifiedBuild`) VALUES +(14182, 15257, 52649), +(14182, 15265, 52649); + +-- Condition for source Gossip menu condition Warrior trainer +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=14182; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(14, 14182, 15257, 0, 0, 15, 0, 1, 0, 0, 0, 0, 0, '', 'Show gossip menu 14182 text id 15257 if player is a Warrior.'), +(14, 14182, 15265, 0, 0, 15, 0, 1, 0, 0, 1, 0, 0, '', 'Show gossip menu 14182 text id 15265 if player is not a Warrior.'); + +-- Seratha Mage trainer Entry: 38246 +UPDATE `creature_template_gossip` SET `MenuID`=14187,`VerifiedBuild`=52649 WHERE `CreatureID`=38246; +DELETE FROM `gossip_menu` WHERE `MenuID`=14187; +INSERT INTO `gossip_menu` (`MenuID`, `TextID`, `VerifiedBuild`) VALUES +(14187, 15275, 52649), +(14187, 15265, 52649); + +-- Condition for source Gossip menu condition Mage trainer +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=14187; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(14, 14187, 15275, 0, 0, 15, 0, 128, 0, 0, 0, 0, 0, '', 'Show gossip menu 14187 text id 15275 if player is a Mage.'), +(14, 14187, 15265, 0, 0, 15, 0, 128, 0, 0, 1, 0, 0, '', 'Show gossip menu 14187 text id 15265 if player is not a Mage.'); + +-- Mage trainer +DELETE FROM `gossip_menu_option` WHERE `MenuID` IN (20690,14187); +INSERT INTO `gossip_menu_option` (`MenuID`, `GossipOptionID`, `OptionID`, `OptionNpc`, `OptionText`, `OptionBroadcastTextID`, `Language`, `Flags`, `ActionMenuID`, `ActionPoiID`, `GossipNpcOptionID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `SpellID`, `OverrideIconID`, `VerifiedBuild`) VALUES +(20690, 47058, 1, 0, 'I would like to unlearn Arcane Momentum and Blink the direction I am facing.', 0, 0, 0, 0, 0, NULL, 0, 0, 'Are you sure you would like me to remove the knowledge of Arcane Momentum from your memory?', 0, NULL, NULL, 52649), +(20690, 47057, 0, 0, 'I would like to learn the Arcane Momentum technique and be able to Blink in the direction I am moving.', 0, 0, 0, 0, 0, NULL,0, 0, 'Are you sure you would like to learn this new technique?', 0, NULL, NULL, 52649), +(14187, 31252, 9, 0, 'I want to talk about the Arcane Momentum technique.', 0, 0, 0, 20690, 0, NULL, 0, 0, NULL, 0, NULL, NULL, 52649); + +-- Condition for source Gossip menu option condition Mage trainer +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (14187,20690); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 14187, 9, 0, 0, 15, 0, 128, 0, 0, 0, 0, 0, '', 'Show gossip menu 14187 option id 9 if player is a Mage.'), +(15, 20690, 0, 0, 0, 25, 0, 56384, 0, 0, 1, 0, 0, '', 'Show gossip menu 20690 option id 0 if target does not have aura Arcane Momentum (effect 0).'), +(15, 20690, 1, 0, 0, 25, 0, 56384, 0, 0, 0, 0, 0, '', 'Show gossip menu 20690 option id 1 if target has aura Arcane Momentum (effect 0).'); + +-- Add gossip for Zen'tabra <Druid Trainer> Entry: 38243 +DELETE FROM `creature_template_gossip` WHERE `CreatureID`=38243; +INSERT INTO `creature_template_gossip` (`CreatureID`,`MenuID`,`VerifiedBuild`) VALUES +(38243,14184,52649); + +-- Zen'tabra <Druid Trainer> Entry: 38243 +DELETE FROM `gossip_menu` WHERE `MenuID`=14184; +INSERT INTO `gossip_menu` (`MenuID`, `TextID`, `VerifiedBuild`) VALUES +(14184, 15272, 52649), +(14184, 15265, 52649); + +-- Condition for source Gossip menu condition Druid Trainer +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=14184; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(14, 14184, 15272, 0, 0, 15, 0, 1024, 0, 0, 0, 0, 0, '', 'Show gossip menu 14184 text id 15272 if player is a Druid.'), +(14, 14184, 15265, 0, 0, 15, 0, 1024, 0, 0, 1, 0, 0, '', 'Show gossip menu 14184 text id 15265 if player is not a Druid.'); + +-- Add gossip for Zabrax <Monk Trainer> Entry: 63310 +DELETE FROM `creature_template_gossip` WHERE `CreatureID`=63310; +INSERT INTO `creature_template_gossip` (`CreatureID`,`MenuID`,`VerifiedBuild`) VALUES +(63310,13865,52649); + +-- Zabrax <Monk Trainer> Entry: 63310 +DELETE FROM `gossip_menu` WHERE `MenuID`=13865; +INSERT INTO `gossip_menu` (`MenuID`, `TextID`, `VerifiedBuild`) VALUES +(13865, 20034, 52649); + +-- Add gossip for Ortezza <Hunter Trainer> Entry: 38247 +DELETE FROM `creature_template_gossip` WHERE `CreatureID`=38247; +INSERT INTO `creature_template_gossip` (`CreatureID`,`MenuID`,`VerifiedBuild`) VALUES +(38247,14188,52649); + +-- Ortezza <Hunter Trainer> Entry: 38247 +DELETE FROM `gossip_menu` WHERE `MenuID`=14188; +INSERT INTO `gossip_menu` (`MenuID`, `TextID`, `VerifiedBuild`) VALUES +(14188, 15276, 52649), +(14188, 15265, 52649); + +-- Condition for source Gossip menu condition Hunter Trainer +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=14188; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(14, 14188, 15276, 0, 0, 15, 0, 4, 0, 0, 0, 0, 0, '', 'Show gossip menu 14188 text id 15276 if player is a Hunter.'), +(14, 14188, 15265, 0, 0, 15, 0, 4, 0, 0, 1, 0, 0, '', 'Show gossip menu 14188 text id 15265 if player is not a Hunter.'); + +-- Add gossip for Tunari <Priest Trainer> Entry: 38245 +DELETE FROM `creature_template_gossip` WHERE `CreatureID`=38245; +INSERT INTO `creature_template_gossip` (`CreatureID`,`MenuID`,`VerifiedBuild`) VALUES +(38245,14186,52649); + +-- Tunari <Priest Trainer> Entry: 38245 +DELETE FROM `gossip_menu` WHERE `MenuID`=14186; +INSERT INTO `gossip_menu` (`MenuID`, `TextID`, `VerifiedBuild`) VALUES +(14186, 15274, 52649), +(14186, 15265, 52649); + +-- Condition for source Gossip menu condition Priest Trainer +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=14186; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(14, 14186, 15274, 0, 0, 15, 0, 16, 0, 0, 0, 0, 0, '', 'Show gossip menu 14186 text id 15274 if player is a Priest.'), +(14, 14186, 15265, 0, 0, 15, 0, 16, 0, 0, 1, 0, 0, '', 'Show gossip menu 14186 text id 15265 if player is not a Priest.'); + +-- Nekali <Shaman Trainer> Entry: 38242 +DELETE FROM `gossip_menu` WHERE `MenuID`=14183; +INSERT INTO `gossip_menu` (`MenuID`, `TextID`, `VerifiedBuild`) VALUES +(14183, @NPCTEXTID+2, 52649), +(14183, 15265, 52649); + +-- Condition for source Gossip menu condition Shaman Trainer +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=14183; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(14, 14183, @NPCTEXTID+2, 0, 0, 15, 0, 64, 0, 0, 0, 0, 0, '', 'Show gossip menu 14183 text id @NPCTEXTID+2 if player is a Shaman.'), +(14, 14183, 15265, 0, 0, 15, 0, 64, 0, 0, 1, 0, 0, '', 'Show gossip menu 14183 text id 15265 if player is not a Shaman.'); + +-- Add gossip for Legati <Rogue Trainer> Entry: 38244 +DELETE FROM `creature_template_gossip` WHERE `CreatureID`=38244; +INSERT INTO `creature_template_gossip` (`CreatureID`,`MenuID`,`VerifiedBuild`) VALUES +(38244,14185,52649); + +-- Legati <Rogue Trainer> Entry: 38244 +DELETE FROM `gossip_menu` WHERE `MenuID`=14185; +INSERT INTO `gossip_menu` (`MenuID`, `TextID`, `VerifiedBuild`) VALUES +(14185, @NPCTEXTID+1, 52649), +(14185, 15265, 52649); + +-- Condition for source Gossip menu condition Rogue Trainer +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=14185; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(14, 14185, @NPCTEXTID+1, 0, 0, 15, 0, 8, 0, 0, 0, 0, 0, '', 'Show gossip menu 14185 text id XXXXX if player is a Rogue.'), +(14, 14185, 15265, 0, 0, 15, 0, 8, 0, 0, 1, 0, 0, '', 'Show gossip menu 14185 text id 15265 if player is not a Rogue.'); + +-- Add gossip for Voldreka <Warlock Trainer> Entry: 42618 +DELETE FROM `creature_template_gossip` WHERE `CreatureID`=42618; +INSERT INTO `creature_template_gossip` (`CreatureID`,`MenuID`,`VerifiedBuild`) VALUES +(42618,14196,52649); + +-- Voldreka <Warlock Trainer> Entry: 42618 +DELETE FROM `gossip_menu` WHERE `MenuID`=14196; +INSERT INTO `gossip_menu` (`MenuID`, `TextID`, `VerifiedBuild`) VALUES +(14196, @NPCTEXTID+0, 52649), +(14196, 15265, 52649); + +-- Condition for source Gossip menu condition Warlock Trainer +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=14196; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(14, 14196, @NPCTEXTID+0, 0, 0, 15, 0, 256, 0, 0, 0, 0, 0, '', 'Show gossip menu 14196 text id XXXXX if player is a Warlock.'), +(14, 14196, 15265, 0, 0, 15, 0, 256, 0, 0, 1, 0, 0, '', 'Show gossip menu 14196 text id 15265 if player is not a Warlock.'); diff --git a/src/server/scripts/Kalimdor/zone_durotar.cpp b/src/server/scripts/Kalimdor/zone_durotar.cpp index 09abff2baf3..eb72607604c 100644 --- a/src/server/scripts/Kalimdor/zone_durotar.cpp +++ b/src/server/scripts/Kalimdor/zone_durotar.cpp @@ -24,6 +24,7 @@ #include "SpellInfo.h" #include "SpellScript.h" #include "ScriptedGossip.h" +#include "PassiveAI.h" /*###### ## Quest 37446: Lazy Peons @@ -177,9 +178,514 @@ private: bool _shipInPort; }; +// Echo Isles +// 91404 - Summon Zuni (Lvl 1) +class spell_durotar_summon_zuni : public SpellScript +{ + void SetDest(SpellDestination& dest) + { + dest.Relocate({ -1173.4531f, -5266.401f, 0.85905945f, 0.0f }); + } + + void Register() override + { + OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_durotar_summon_zuni::SetDest, EFFECT_0, TARGET_DEST_NEARBY_ENTRY); + } +}; + +enum TikiTargetData +{ + SPELL_ARCANE_MISSILES_TRAINER = 83470, + SPELL_TIKI_TARGET_VISUAL_1 = 71064, + SPELL_TIKI_TARGET_VISUAL_2 = 71065, + SPELL_TIKI_TARGET_VISUAL_3 = 71066, + SPELL_TIKI_TARGET_DEATH = 71240 +}; + +uint32 const TiKiTargetMask[3] = { SPELL_TIKI_TARGET_VISUAL_1, SPELL_TIKI_TARGET_VISUAL_2, SPELL_TIKI_TARGET_VISUAL_3 }; + +struct npc_durotar_tiki_target : public ScriptedAI +{ + npc_durotar_tiki_target(Creature* creature) : ScriptedAI(creature), _credited(false) { } + + void JustAppeared() override + { + me->SetReactState(REACT_PASSIVE); + me->SetTemplateRooted(true); + DoCastSelf(TiKiTargetMask[urand(0, 2)]); + DoCastSelf(SPELL_ARCANE_MISSILES_TRAINER); + } + + void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override + { + if (me->GetHealth() <= damage) + { + damage = 0; + me->SetHealth(1); + + if (!_credited) + { + _credited = true; + + DoCastSelf(SPELL_TIKI_TARGET_DEATH); + + if (Player* player = attacker->ToPlayer()) + player->KilledMonsterCredit(me->GetEntry()); + + me->DespawnOrUnsummon(2s, 13s); + } + } + } + +private: + bool _credited; +}; + +enum DarkspearJailorData +{ + ACTION_EVENT_COMPLETE = 1, + ACTION_MOVE_TO_PRISONER = 1, + + EVENT_PLAYER_ACCEPT_CHALLENGE = 1, + EVENT_WALK_BACK_TO_HOME = 2, + + GOSSIP_JAILOR_EVENT_NOT_READY = 10973, + GOSSIP_JAILOR_EVENT_READY = 10974, + + GOSSIP_EVENT_IN_PROGRESS_ID = 10973, + TEXT_GOSSIP_EVENT_IN_PROGRESS = 15252, + + NPC_DARKSPEAR_JAILOR = 39062, + NPC_CAPTIVE_SPITESCALE_SCOUT = 38142, + + PATH_CAGE_ONE = 30915500, + PATH_HOME_ONE = 30915501, + PATH_CAGE_TWO = 30908200, + PATH_HOME_TWO = 30908201, + + SAY_GET_IN_THE_PIT = 0, + + SPELL_ACTIVATE_DNT = 227105, +}; + +// 39062 - Darkspear Jailor +struct npc_darkspear_jailor : public ScriptedAI +{ + npc_darkspear_jailor(Creature* creature) : ScriptedAI(creature), _eventInProgress(false), _pathCage(0), _pathHome(0) { } + + void JustAppeared() override + { + me->SetGossipMenuId(GOSSIP_JAILOR_EVENT_READY); + + if (me->HasStringId("darkspear_jailor_one")) + { + _pathCage = PATH_CAGE_ONE; + _pathHome = PATH_HOME_ONE; + } + else if (me->HasStringId("darkspear_jailor_two")) + { + _pathCage = PATH_CAGE_TWO; + _pathHome = PATH_HOME_TWO; + } + } + + void DoAction(int32 param) override + { + if (param == ACTION_EVENT_COMPLETE) + { + _eventInProgress = false; + me->SetGossipMenuId(GOSSIP_JAILOR_EVENT_READY); + } + } + + void WaypointPathEnded(uint32 /*nodeId*/, uint32 pathId) override + { + if (pathId == _pathCage) + { + me->HandleEmoteCommand(EMOTE_ONESHOT_USE_STANDING); + me->CastSpell(me, SPELL_ACTIVATE_DNT); + _events.ScheduleEvent(EVENT_WALK_BACK_TO_HOME, 1s); + } + } + + bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override + { + CloseGossipMenuFor(player); + player->KilledMonsterCredit(NPC_DARKSPEAR_JAILOR); + Talk(SAY_GET_IN_THE_PIT, player); + _eventInProgress = true; + me->SetGossipMenuId(GOSSIP_JAILOR_EVENT_NOT_READY); + _events.ScheduleEvent(EVENT_PLAYER_ACCEPT_CHALLENGE, 2s); + return true; + } + + void UpdateAI(uint32 diff) override + { + _events.Update(diff); + + while (uint32 eventId = _events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_PLAYER_ACCEPT_CHALLENGE: + me->GetMotionMaster()->MovePath(_pathCage, false); + break; + case EVENT_WALK_BACK_TO_HOME: + if (Creature* scout = me->FindNearestCreature(NPC_CAPTIVE_SPITESCALE_SCOUT, 5.0f, true)) + scout->AI()->DoAction(ACTION_MOVE_TO_PRISONER); + me->GetMotionMaster()->MovePath(_pathHome, false); + break; + default: + break; + } + } + + if (!UpdateVictim()) + return; + + DoMeleeAttackIfReady(); + } +private: + EventMap _events; + bool _eventInProgress; + uint32 _pathCage; + uint32 _pathHome; +}; + +enum CaptiveSpitescaleScoutData +{ + EVENT_UPDATE_JAILOR_GOSSIP = 1, + EVENT_TALK_TO_PLAYER = 2, + EVENT_DESPAWN_OUT_OF_COMBAT = 3, + EVENT_CAST_FROSTSHOCK = 4, + + POINT_PRISONER_POSITION = 0, + + SAY_SEND_YOU_TO_YOUR_DEATH = 0, + + SPELL_FROST_SHOCK = 15089 +}; + +Position const PrisonerPositionOne = { -1142.49f, -5415.59f, 10.597655f }; +Position const PrisonerPositionTwo = { -1149.03f, -5526.18f, 8.1045685f }; + +// 38142 - Captive Spitescale Scout +struct npc_captive_spitescale_scout : public ScriptedAI +{ + npc_captive_spitescale_scout(Creature* creature) : ScriptedAI(creature) { } + + void JustAppeared() override + { + _events.ScheduleEvent(EVENT_UPDATE_JAILOR_GOSSIP, 2s); + } + + void JustDied(Unit* /*killer*/) override + { + me->SetImmuneToPC(true); + me->DespawnOrUnsummon(10s, 7s); + } + + void EnterEvadeMode(EvadeReason /*why*/) override + { + me->DespawnOrUnsummon(0s, 2s); + } + + void JustEngagedWith(Unit* /*who*/) override + { + _events.CancelEvent(EVENT_DESPAWN_OUT_OF_COMBAT); + _events.ScheduleEvent(EVENT_CAST_FROSTSHOCK, 2s, 4s); + } + + void DoAction(int32 param) override + { + if (param == ACTION_MOVE_TO_PRISONER) + { + me->SetWalk(true); + + if (me->HasStringId("captive_spitescale_scout_one")) + me->GetMotionMaster()->MovePoint(POINT_PRISONER_POSITION, PrisonerPositionOne); + else if (me->HasStringId("captive_spitescale_scout_two")) + me->GetMotionMaster()->MovePoint(POINT_PRISONER_POSITION, PrisonerPositionTwo); + } + } + + void MovementInform(uint32 type, uint32 id) override + { + if (type == POINT_MOTION_TYPE && id == POINT_PRISONER_POSITION) + { + _events.ScheduleEvent(EVENT_TALK_TO_PLAYER, 1s); + _events.ScheduleEvent(EVENT_DESPAWN_OUT_OF_COMBAT, 100s); + } + } + + void UpdateAI(uint32 diff) override + { + _events.Update(diff); + + while (uint32 eventId = _events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_UPDATE_JAILOR_GOSSIP: + if (Creature* jailer = me->FindNearestCreature(NPC_DARKSPEAR_JAILOR, 25.0f, true)) + jailer->AI()->DoAction(ACTION_EVENT_COMPLETE); + break; + case EVENT_TALK_TO_PLAYER: + Talk(SAY_SEND_YOU_TO_YOUR_DEATH); + me->SetImmuneToPC(false); + break; + case EVENT_DESPAWN_OUT_OF_COMBAT: + me->DespawnOrUnsummon(0s, 2s); + break; + case EVENT_CAST_FROSTSHOCK: + DoCastVictim(SPELL_FROST_SHOCK); + break; + default: + break; + } + } + + if (!UpdateVictim()) + return; + + DoMeleeAttackIfReady(); + } + +private: + EventMap _events; + ObjectGuid _jailorGUID; +}; + +enum ProvingPitData +{ + EVENT_MOVE_TO_PIT = 1, + EVENT_MOVE_HOME = 2, + + GOSSIP_MENU_ARCANE_MOMENTUN = 20690, + + GOSSIP_OPTION_TRAIN_MOMENTUM = 0, + GOSSIP_OPTION_UNTRAIN_MOMENTUM = 1, + + NPC_TRAINER_NORTET = 38037, // Warrior Trainer + NPC_TRAINER_TUNARI = 38245, // Priest Trainer + NPC_TRAINER_SERATHA = 38246, // Mage Trainer + NPC_TRAINER_LEGATI = 38244, // Rogue Trainer + NPC_TRAINER_NEKALI = 38242, // Shaman Trainer + NPC_TRAINER_ERTEZZA = 38247, // Hunter Trainer + NPC_TRAINER_ZENTABRA = 38243, // Druid Trainer + NPC_TRAINER_VOLDREKA = 42618, // Warlock Trainer + NPC_TRAINER_ZABRAX = 63310, // Monk Trainer + + QUEST_PROVING_PIT_WARRIOR = 24642, + QUEST_PROVING_PIT_PRIEST = 24786, + QUEST_PROVING_PIT_MAGE = 24754, + QUEST_PROVING_PIT_ROGUE = 24774, + QUEST_PROVING_PIT_SHAMAN = 24762, + QUEST_PROVING_PIT_HUNTER = 24780, + QUEST_PROVING_PIT_DRUID = 24768, + QUEST_PROVING_PIT_WARLOCK = 26276, + QUEST_PROVING_PIT_MONK = 31161, + + SPELL_LEARN_ARCANE_MOMENTUM = 232062, + SPELL_UNLEARN_ARCANE_MOMENTUM = 232063, + + SAY_NOT_BAD = 0, + SAY_WELL_DONE = 1, + + POINT_INITIAL_HOME = 1, +}; + +// Path point to proving pit fo trainers +Position const EchoIslandTrainersPitPoints[9] = +{ + { -1158.99f, -5421.14f, 13.218976f, 0.2094395f }, // Nortet Pit + { -1137.0f, -5528.23f, 11.979752f, 3.1764990f }, // Tunari Pit + { -1145.95f, -5543.13f, 12.48863f, 1.7278759f }, // Seratha Pit + { -1146.67f, -5430.05f, 13.596256f, 1.4835298f }, // Legati Pit + { -1152.22f, -5407.6f, 13.263395f, 4.904375f }, // Nekali Pit + { -1136.46f, -5525.13f, 11.99673f, 3.3161256f }, // Ertezza Pit + { -1158.81f, -5533.08f, 11.939185f, 0.3141593f }, // Zentabra Pit + { -1149.92f, -5407.46f, 13.235063f, 4.956735f }, // Voldreka Pit + { -1151.54f, -5429.86f, 13.29182f, 1.256637f } // Zabrax Pit +}; + +template<uint8 PitPos, uint32 QuestID> +struct npc_echo_isles_class_trainer : public ScriptedAI +{ + npc_echo_isles_class_trainer(Creature* creature) : ScriptedAI(creature), _canMoveToPit(true) { } + + void JustAppeared() override + { + _initialHomePosition = me->GetPosition(); + } + + void MovementInform(uint32 type, uint32 id) override + { + if (type == POINT_MOTION_TYPE && id == POINT_INITIAL_HOME) + _canMoveToPit = true; + } + + void OnQuestAccept(Player* /*player*/, Quest const* quest) override + { + if (quest->GetQuestId() == QuestID) + { + if (_canMoveToPit) + { + _events.ScheduleEvent(EVENT_MOVE_TO_PIT, 2s); + _canMoveToPit = false; + } + } + } + + void OnQuestReward(Player* /*player*/, Quest const* quest, LootItemType /*type*/, uint32 /*opt*/) override + { + if (quest->GetQuestId() == QuestID) + _events.RescheduleEvent(EVENT_MOVE_HOME, 60s); + } + + bool OnGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override + { + // Use by Mage + if (menuId == GOSSIP_MENU_ARCANE_MOMENTUN) + { + CloseGossipMenuFor(player); + + switch (gossipListId) + { + case GOSSIP_OPTION_TRAIN_MOMENTUM: + player->CastSpell(player, SPELL_LEARN_ARCANE_MOMENTUM); + break; + case GOSSIP_OPTION_UNTRAIN_MOMENTUM: + player->CastSpell(player, SPELL_UNLEARN_ARCANE_MOMENTUM); + break; + default: + break; + } + return true; + } + return false; + } + + void UpdateAI(uint32 diff) override + { + _events.Update(diff); + + while (uint32 eventId = _events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_MOVE_TO_PIT: + me->SetWalk(true); + me->GetMotionMaster()->MovePoint(0, EchoIslandTrainersPitPoints[PitPos], true, EchoIslandTrainersPitPoints[PitPos].GetOrientation()); + _events.ScheduleEvent(EVENT_MOVE_HOME, 300s); + break; + case EVENT_MOVE_HOME: + me->SetWalk(true); + me->GetMotionMaster()->MovePoint(POINT_INITIAL_HOME, _initialHomePosition, true, _initialHomePosition.GetOrientation()); + break; + default: + break; + } + } + + if (!UpdateVictim()) + return; + + DoMeleeAttackIfReady(); + } + +private: + EventMap _events; + bool _canMoveToPit; + Position _initialHomePosition; +}; + +// 24639 - The Basics: Hitting Things (Warrior) +// 24783 - The Basics: Hitting Things (Priest) +// 24751 - The Basics: Hitting Things (Mage) +// 24771 - The Basics: Hitting Things (Rogue) +// 24759 - The Basics: Hitting Things (Shaman) +// 24777 - The Basics: Hitting Things (Hunter) +// 24765 - The Basics: Hitting Things (Druid) +// 26273 - The Basics: Hitting Things (Warlock) +// 31158 - The Basics: Hitting Things (Monk) +template<uint32 TrainerEntry> +class quest_the_basics_hitting_things : public QuestScript +{ +public: + quest_the_basics_hitting_things(char const* scriptName) : QuestScript(scriptName) { } + + void OnQuestStatusChange(Player* player, Quest const* /*quest*/, QuestStatus /*oldStatus*/, QuestStatus newStatus) override + { + if (newStatus == QUEST_STATUS_COMPLETE) + { + if (Creature* creature = player->FindNearestCreature(TrainerEntry, 50.0f, true)) + creature->AI()->Talk(SAY_NOT_BAD, player); + } + } +}; + +// 24642 - Proving Pit (Warrior) +// 24786 - Proving Pit (Priest) +// 24754 - Proving Pit (Mage) +// 24774 - Proving Pit (Rogue) +// 24762 - Proving Pit (Shaman) +// 24780 - Proving Pit (Hunter) +// 24768 - Proving Pit (Druid) +// 26276 - Proving Pit (Warlock) +// 31161 - Proving Pit (Monk) +template<uint32 TrainerId> +class quest_proving_pit : public QuestScript +{ +public: + quest_proving_pit(char const* scriptName) : QuestScript(scriptName) { } + + void OnQuestStatusChange(Player* player, Quest const* /*quest*/, QuestStatus /*oldStatus*/, QuestStatus newStatus) override + { + if (newStatus == QUEST_STATUS_COMPLETE) + { + if (Creature* creature = player->FindNearestCreature(TrainerId, 50.0f, true)) + creature->AI()->Talk(SAY_WELL_DONE, player); + } + } +}; + void AddSC_durotar() { new npc_lazy_peon(); RegisterSpellScript(spell_voodoo); RegisterCreatureAI(npc_mithaka); + + // Echo Isles + RegisterSpellScript(spell_durotar_summon_zuni); + RegisterCreatureAI(npc_durotar_tiki_target); + RegisterCreatureAI(npc_darkspear_jailor); + RegisterCreatureAI(npc_captive_spitescale_scout); + new GenericCreatureScript<npc_echo_isles_class_trainer<0, QUEST_PROVING_PIT_WARRIOR>>("npc_nortet"); + new GenericCreatureScript<npc_echo_isles_class_trainer<1, QUEST_PROVING_PIT_PRIEST>>("npc_tunari"); + new GenericCreatureScript<npc_echo_isles_class_trainer<2, QUEST_PROVING_PIT_MAGE>>("npc_seratha"); + new GenericCreatureScript<npc_echo_isles_class_trainer<3, QUEST_PROVING_PIT_ROGUE>>("npc_legati"); + new GenericCreatureScript<npc_echo_isles_class_trainer<4, QUEST_PROVING_PIT_SHAMAN>>("npc_nekali"); + new GenericCreatureScript<npc_echo_isles_class_trainer<5, QUEST_PROVING_PIT_HUNTER>>("npc_ertezza"); + new GenericCreatureScript<npc_echo_isles_class_trainer<6, QUEST_PROVING_PIT_DRUID>>("npc_zentabra"); + new GenericCreatureScript<npc_echo_isles_class_trainer<7, QUEST_PROVING_PIT_WARLOCK>>("npc_voldreka"); + new GenericCreatureScript<npc_echo_isles_class_trainer<8, QUEST_PROVING_PIT_MONK>>("npc_zabrax"); + new quest_the_basics_hitting_things<NPC_TRAINER_NORTET>("quest_the_basics_hitting_things_warrior"); + new quest_the_basics_hitting_things<NPC_TRAINER_TUNARI>("quest_the_basics_hitting_things_priest"); + new quest_the_basics_hitting_things<NPC_TRAINER_SERATHA>("quest_the_basics_hitting_things_mage"); + new quest_the_basics_hitting_things<NPC_TRAINER_LEGATI>("quest_the_basics_hitting_things_rogue"); + new quest_the_basics_hitting_things<NPC_TRAINER_NEKALI>("quest_the_basics_hitting_things_shaman"); + new quest_the_basics_hitting_things<NPC_TRAINER_ERTEZZA>("quest_the_basics_hitting_things_hunter"); + new quest_the_basics_hitting_things<NPC_TRAINER_ZENTABRA>("quest_the_basics_hitting_things_druid"); + new quest_the_basics_hitting_things<NPC_TRAINER_VOLDREKA>("quest_the_basics_hitting_things_warlock"); + new quest_the_basics_hitting_things<NPC_TRAINER_ZABRAX>("quest_the_basics_hitting_things_monk"); + new quest_proving_pit<NPC_TRAINER_NORTET>("quest_proving_pit_warrior"); + new quest_proving_pit<NPC_TRAINER_TUNARI>("quest_proving_pit_priest"); + new quest_proving_pit<NPC_TRAINER_SERATHA>("quest_proving_pit_mage"); + new quest_proving_pit<NPC_TRAINER_LEGATI>("quest_proving_pit_rogue"); + new quest_proving_pit<NPC_TRAINER_NEKALI>("quest_proving_pit_shaman"); + new quest_proving_pit<NPC_TRAINER_ERTEZZA>("quest_proving_pit_hunter"); + new quest_proving_pit<NPC_TRAINER_ZENTABRA>("quest_proving_pit_druid"); + new quest_proving_pit<NPC_TRAINER_VOLDREKA>("quest_proving_pit_warlock"); + new quest_proving_pit<NPC_TRAINER_ZABRAX>("quest_proving_pit_monk"); } |