Scripts/Westfall: Implement Quest: "Lou's Parting Thoughts" (#31855)
Co-Authored-By: funjoker <[email protected]>
This commit is contained in:
@@ -0,0 +1,100 @@
|
|||||||
|
-- Delete static spawns
|
||||||
|
DELETE FROM `creature` WHERE `guid`=275910;
|
||||||
|
DELETE FROM `creature` WHERE `guid`=275911;
|
||||||
|
DELETE FROM `creature` WHERE `guid`=275915;
|
||||||
|
DELETE FROM `creature` WHERE `guid`=275916;
|
||||||
|
|
||||||
|
-- Areatrigger Scripts
|
||||||
|
DELETE FROM `areatrigger_scripts` WHERE `entry`=5988;
|
||||||
|
INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES
|
||||||
|
(5988, 'at_westfall_two_shoed_lou_thugs');
|
||||||
|
|
||||||
|
DELETE FROM `areatrigger_scripts` WHERE `entry`=5987;
|
||||||
|
INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES
|
||||||
|
(5987, 'at_westfall_small_time_hustler');
|
||||||
|
|
||||||
|
DELETE FROM `areatrigger_scripts` WHERE `entry` = 5989;
|
||||||
|
INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES
|
||||||
|
(5989, 'SmartTrigger');
|
||||||
|
|
||||||
|
-- Template
|
||||||
|
UPDATE `creature_template` SET `ScriptName`='npc_westfall_small_time_hustler' WHERE `entry`=42390;
|
||||||
|
UPDATE `creature_template` SET `ScriptName`='npc_westfall_thug' WHERE `entry`=42387;
|
||||||
|
UPDATE `creature_template` SET `ScriptName`='npc_westfall_lous_parting_thoughts_trigger' WHERE `entry`=42562;
|
||||||
|
|
||||||
|
-- SpellArea
|
||||||
|
DELETE FROM `spell_area` WHERE (`spell`=79346 AND `area`=40) OR (`spell`=79229 AND `area`=40);
|
||||||
|
INSERT INTO `spell_area` (`spell`, `area`, `quest_start`, `quest_end`, `aura_spell`, `racemask`, `gender`, `flags`, `quest_start_status`, `quest_end_status`) VALUES
|
||||||
|
(79346, 40, 26232, 0, 0, 0, 2, 3, 66, 11),
|
||||||
|
(79229, 40, 0, 26232, 0, 0, 2, 3, 64, 9);
|
||||||
|
|
||||||
|
-- Creature Text
|
||||||
|
DELETE FROM `creature_text` WHERE `CreatureID` IN (42387, 42562);
|
||||||
|
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `comment`) VALUES
|
||||||
|
(42387, 0, 0, 'Did you... Did you meet her?', 12, 7, 100, 6, 0, 0, 42439, 'Thug to Player'),
|
||||||
|
(42387, 1, 0, 'Yep. She\'s for real.', 12, 7, 100, 396, 0, 0, 42440, 'Thug to Player'),
|
||||||
|
(42387, 2, 0, 'She wanted me to tell you lugs that she appreciates the job that we did for her on the Furlbrows. Gave me a pile o\' gold to split with you all.', 12, 7, 100, 396, 0, 0, 42441, 'Thug to Player'),
|
||||||
|
(42387, 3, 0, 'See her face? Is it really...', 12, 0, 100, 6, 0, 0, 42442, 'Thug to Player'),
|
||||||
|
(42387, 4, 0, 'Whoa, what do we have here? Looks like we have ourselves an eavesdropper, boys.', 12, 0, 100, 5, 0, 0, 42443, 'Thug to Player'),
|
||||||
|
(42387, 5, 0, 'Only one thing to do with a lousy, good-for-nothin eavesdropper.', 12, 0, 100, 397, 0, 0, 42444, 'Thug to Player'),
|
||||||
|
(42387, 6, 0, 'DIE!', 12, 0, 100, 53, 0, 0, 28793, 'Thug to Player'), -- BroadcastTextID: 1694 - 9359 - 14091 - 28793 - 42445 - 51125 - 69531
|
||||||
|
(42562, 0, 0, 'Hurry back to the Furlbrow\'s Cottage!', 42, 0, 100, 0, 0, 0, 42446, 'Lou\'s Parting Thoughts Trigger to Player');
|
||||||
|
|
||||||
|
DELETE FROM `creature_text` WHERE `CreatureID` = 42390;
|
||||||
|
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `comment`) VALUES
|
||||||
|
(42390, 0, 0, 'Pssst...', 12, 0, 100, 0, 0, 0, 42306, 'Small-Time Hustler to Player'),
|
||||||
|
(42390, 1, 0, 'What\'re you doin\' out here? Slummin\'?', 12, 7, 100, 25, 0, 0, 42310, 'Small-Time Hustler to Player'),
|
||||||
|
(42390, 1, 1, 'I think we can do business.', 12, 7, 100, 25, 0, 0, 42313, 'Small-Time Hustler to Player'),
|
||||||
|
(42390, 1, 2, 'You need something, $g mack:lady;?', 12, 7, 100, 25, 0, 0, 42307, 'Small-Time Hustler to Player'),
|
||||||
|
(42390, 1, 3, 'You lookin\' for somethin\' a little more... exotic?', 12, 7, 100, 25, 0, 0, 42312, 'Small-Time Hustler to Player'),
|
||||||
|
(42390, 1, 4, 'Whaddya need? Information? I got that too!', 12, 7, 100, 25, 0, 0, 42311, 'Small-Time Hustler to Player'),
|
||||||
|
(42390, 1, 5, 'Keep your head low, $g buddy:lady;.', 12, 7, 100, 25, 0, 0, 42314, 'Small-Time Hustler to Player');
|
||||||
|
|
||||||
|
DELETE FROM `creature_text` WHERE `CreatureID` = 42559;
|
||||||
|
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `comment`) VALUES
|
||||||
|
(42559, 0, 0, 'You were standing right here! What the hell did you see? Speak up!', 12, 7, 100, 0, 0, 0, 42456, 'Stormwind Investigator to Player'),
|
||||||
|
(42559, 1, 0, 'Natural causes? Two bullets in the chest and his shoes are on his head. What kind of natural death would that be?', 12, 7, 100, 0, 0, 0, 42458, 'Stormwind Investigator to Player');
|
||||||
|
|
||||||
|
DELETE FROM `creature_text` WHERE `CreatureID` = 42384 AND `GroupID` = 11;
|
||||||
|
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `comment`) VALUES
|
||||||
|
(42384, 11, 0, 'I... I didn\'t see nothin\'! He... he died of natural causes.', 12, 7, 100, 0, 0, 0, 42457, 'Homeless Stormwind Citizen to Player');
|
||||||
|
|
||||||
|
DELETE FROM `creature_text` WHERE `CreatureID` = 42558;
|
||||||
|
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `comment`) VALUES
|
||||||
|
(42558, 0, 0, 'Doesn\'t look good, rookie.', 12, 7, 100, 1, 0, 0, 42447, 'Lieutenant Horatio Laine to Player'),
|
||||||
|
(42558, 1, 0, 'This was an execution. Whoever did this was sending a message...', 12, 7, 100, 0, 0, 0, 42449, 'Lieutenant Horatio Laine to Player'),
|
||||||
|
(42558, 2, 0, 'A message for anyone that would dare snitch on these criminals.', 12, 7, 100, 0, 0, 0, 42450, 'Lieutenant Horatio Laine to Player'),
|
||||||
|
(42558, 3, 0, 'It would appear that poor Lou really put his foot...', 12, 7, 100, 0, 0, 0, 42451, 'Lieutenant Horatio Laine to Player'),
|
||||||
|
(42558, 4, 0, 'In his mouth.', 12, 7, 100, 0, 0, 0, 42452, 'Lieutenant Horatio Laine to Player');
|
||||||
|
|
||||||
|
-- Clientside area trigger 5989 smart ai
|
||||||
|
SET @ENTRY := 5989;
|
||||||
|
DELETE FROM `areatrigger_scripts` WHERE `entry` = @ENTRY;
|
||||||
|
INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES (@ENTRY, 'SmartTrigger');
|
||||||
|
DELETE FROM `smart_scripts` WHERE `source_type` = 2 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, 2, 0, 0, 46, 0, 100, 0, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 0, 10, 251575, 42558, 0, 0, 0, 0, 0, 'On trigger - Creature Lieutenant Horatio Laine (42558) with guid 251575 (fetching): Set creature data #1 to 1', '');
|
||||||
|
|
||||||
|
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 5989 AND `SourceId` = 2;
|
||||||
|
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ConditionStringValue1`, `NegativeCondition`, `Comment`) VALUES
|
||||||
|
(22, 1, 5989, 2, 0, 28, 0, 26232, 0, 0, '', 0, 'Action invoker has completed quest quest Lou\'s Parting Thoughts (26232) (but not yet rewarded)');
|
||||||
|
|
||||||
|
-- Lieutenant Horatio Laine smart ai
|
||||||
|
SET @ENTRY := 42558;
|
||||||
|
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, 38, 0, 100, 0, 1, 1, 0, 0, 0, 80, 4255800, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'On data[1] set to 1 - Self: Start timed action list id #Lieutenant Horatio Laine #0 (4255800) (update out of combat)', '');
|
||||||
|
|
||||||
|
-- Timed list 4255800 smart ai
|
||||||
|
SET @ENTRY := 4255800;
|
||||||
|
DELETE FROM `smart_scripts` WHERE `source_type` = 9 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, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 10, 251574, 42559, 0, 0, 0, 0, 0, 'After 0 seconds - Creature Stormwind Investigator (42559) with guid 251574 (fetching): Talk 0 to invoker', ''),
|
||||||
|
(@ENTRY, 9, 1, 0, 0, 0, 100, 0, 4500, 4500, 0, 0, 0, 1, 11, 0, 0, 0, 0, 0, 0, 10, 251572, 42384, 0, 0, 0, 0, 0, 'After 4.5 seconds - Creature Homeless Stormwind Citizen (42384) with guid 251572 (fetching): Talk 11 to invoker', ''),
|
||||||
|
(@ENTRY, 9, 2, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 10, 251574, 42559, 0, 0, 0, 0, 0, 'After 4 seconds - Creature Stormwind Investigator (42559) with guid 251574 (fetching): Talk 1 to invoker', ''),
|
||||||
|
(@ENTRY, 9, 3, 0, 0, 0, 100, 0, 10000, 10000, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'After 10 seconds - Self: Talk 0 to invoker', ''),
|
||||||
|
(@ENTRY, 9, 4, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'After 5 seconds - Self: Talk 1 to invoker', ''),
|
||||||
|
(@ENTRY, 9, 5, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'After 6 seconds - Self: Talk 2 to invoker', ''),
|
||||||
|
(@ENTRY, 9, 6, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'After 6 seconds - Self: Talk 3 to invoker', ''),
|
||||||
|
(@ENTRY, 9, 7, 0, 0, 0, 100, 0, 3500, 3500, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'After 3.5 seconds - Self: Talk 4 to invoker', '');
|
||||||
@@ -26,6 +26,7 @@
|
|||||||
#include "SpellAuraEffects.h"
|
#include "SpellAuraEffects.h"
|
||||||
#include "SpellScript.h"
|
#include "SpellScript.h"
|
||||||
#include "SharedDefines.h"
|
#include "SharedDefines.h"
|
||||||
|
#include "TemporarySummon.h"
|
||||||
|
|
||||||
namespace Scripts::EasternKingdoms::Westfall
|
namespace Scripts::EasternKingdoms::Westfall
|
||||||
{
|
{
|
||||||
@@ -39,11 +40,15 @@ namespace Creatures
|
|||||||
static constexpr uint32 HomelessStormwindCitizen2 = 42384;
|
static constexpr uint32 HomelessStormwindCitizen2 = 42384;
|
||||||
static constexpr uint32 WestPlainDrifter = 42391;
|
static constexpr uint32 WestPlainDrifter = 42391;
|
||||||
static constexpr uint32 Transient = 42383;
|
static constexpr uint32 Transient = 42383;
|
||||||
|
static constexpr uint32 LousPartingThoughtsTrigger = 42562;
|
||||||
|
static constexpr uint32 Thug = 42387;
|
||||||
|
static constexpr uint32 SmallTimeHustler = 42390;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Quests
|
namespace Quests
|
||||||
{
|
{
|
||||||
static constexpr uint32 MurderWasTheCaseThatTheyGaveMe = 26209;
|
static constexpr uint32 MurderWasTheCaseThatTheyGaveMe = 26209;
|
||||||
|
static constexpr uint32 LousPartingThoughts = 26232;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Spells
|
namespace Spells
|
||||||
@@ -60,6 +65,7 @@ namespace Spells
|
|||||||
static constexpr uint32 SummonRagamuffinLooter3 = 79172;
|
static constexpr uint32 SummonRagamuffinLooter3 = 79172;
|
||||||
static constexpr uint32 SummonRagamuffinLooter4 = 79173;
|
static constexpr uint32 SummonRagamuffinLooter4 = 79173;
|
||||||
static constexpr uint32 HoboAggro = 79168;
|
static constexpr uint32 HoboAggro = 79168;
|
||||||
|
static constexpr uint32 HoboInformation = 79184;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Gossip
|
namespace Gossip
|
||||||
@@ -90,6 +96,26 @@ namespace Events
|
|||||||
static constexpr uint32 ResumeMove = 7;
|
static constexpr uint32 ResumeMove = 7;
|
||||||
static constexpr uint32 GroupOOC = 1;
|
static constexpr uint32 GroupOOC = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace LousPartingThoughts
|
||||||
|
{
|
||||||
|
static constexpr uint32 SummonThugs = 1;
|
||||||
|
static constexpr uint32 ThugSay0 = 2;
|
||||||
|
static constexpr uint32 ThugSay1 = 3;
|
||||||
|
static constexpr uint32 ThugSay2 = 4;
|
||||||
|
static constexpr uint32 ThugSay3 = 5;
|
||||||
|
static constexpr uint32 ThugSay4 = 6;
|
||||||
|
static constexpr uint32 ThugSay5 = 7;
|
||||||
|
static constexpr uint32 ThugSay6 = 8;
|
||||||
|
static constexpr uint32 ThugCredit = 9;
|
||||||
|
static constexpr uint32 ThugShoot1 = 10;
|
||||||
|
static constexpr uint32 ThugShoot2 = 11;
|
||||||
|
static constexpr uint32 ThugScream = 12;
|
||||||
|
static constexpr uint32 ThugWarning = 13;
|
||||||
|
static constexpr uint32 HustlerSay0 = 14;
|
||||||
|
static constexpr uint32 HustlerSay1 = 15;
|
||||||
|
static constexpr uint32 HustlerEventReset = 16;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Actions
|
namespace Actions
|
||||||
@@ -99,6 +125,15 @@ namespace Actions
|
|||||||
static constexpr uint32 HoboAggroAction = 1;
|
static constexpr uint32 HoboAggroAction = 1;
|
||||||
static constexpr uint32 HoboAggroActionDone = 2;
|
static constexpr uint32 HoboAggroActionDone = 2;
|
||||||
}
|
}
|
||||||
|
namespace LousPartingThoughts
|
||||||
|
{
|
||||||
|
static constexpr uint32 ThugReset = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace Data
|
||||||
|
{
|
||||||
|
static constexpr uint32 DataThugDeath = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Text
|
namespace Text
|
||||||
@@ -107,7 +142,6 @@ namespace Text
|
|||||||
{
|
{
|
||||||
static constexpr uint32 AnnounceOutOfArea = 0;
|
static constexpr uint32 AnnounceOutOfArea = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace HoboText
|
namespace HoboText
|
||||||
{
|
{
|
||||||
static constexpr uint32 HoboSayClue1 = 0;
|
static constexpr uint32 HoboSayClue1 = 0;
|
||||||
@@ -122,6 +156,28 @@ namespace Text
|
|||||||
static constexpr uint32 HoboPropertyRage = 9;
|
static constexpr uint32 HoboPropertyRage = 9;
|
||||||
static constexpr uint32 HoboFlee = 10;
|
static constexpr uint32 HoboFlee = 10;
|
||||||
}
|
}
|
||||||
|
namespace ThugText
|
||||||
|
{
|
||||||
|
static constexpr uint32 ThugSay0 = 0;
|
||||||
|
static constexpr uint32 ThugSay1 = 1;
|
||||||
|
static constexpr uint32 ThugSay2 = 2;
|
||||||
|
static constexpr uint32 ThugSay3 = 3;
|
||||||
|
static constexpr uint32 ThugSay4 = 4;
|
||||||
|
static constexpr uint32 ThugSay5 = 5;
|
||||||
|
static constexpr uint32 ThugSay6 = 6;
|
||||||
|
static constexpr uint32 SayWarning = 0;
|
||||||
|
}
|
||||||
|
namespace SmallTimeHustlerText
|
||||||
|
{
|
||||||
|
static constexpr uint32 HustlerSay0 = 0;
|
||||||
|
static constexpr uint32 HustlerSay1 = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace Sounds
|
||||||
|
{
|
||||||
|
static constexpr uint32 Shooting = 15071;
|
||||||
|
static constexpr uint32 Scream = 17852;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Area
|
namespace Area
|
||||||
@@ -629,6 +685,322 @@ class spell_westfall_aggro_hobo : public SpellScript
|
|||||||
OnEffectHitTarget += SpellEffectFn(spell_westfall_aggro_hobo::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
OnEffectHitTarget += SpellEffectFn(spell_westfall_aggro_hobo::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 5988 - Areatrigger
|
||||||
|
class at_westfall_two_shoed_lou_thugs : public AreaTriggerScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
at_westfall_two_shoed_lou_thugs() : AreaTriggerScript("at_westfall_two_shoed_lou_thugs") {}
|
||||||
|
|
||||||
|
bool OnTrigger(Player* player, AreaTriggerEntry const* /*at*/) override
|
||||||
|
{
|
||||||
|
if (player->IsAlive())
|
||||||
|
if (player->GetQuestStatus(Quests::LousPartingThoughts) == QUEST_STATUS_INCOMPLETE)
|
||||||
|
if (Creature* lousPartingThoughtsTrigger = player->FindNearestCreature(Creatures::LousPartingThoughtsTrigger, 50.0f, true))
|
||||||
|
lousPartingThoughtsTrigger->AI()->SetGUID(player->GetGUID(), 0);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 42387 - Westfall Thug
|
||||||
|
struct npc_westfall_thug : public ScriptedAI
|
||||||
|
{
|
||||||
|
npc_westfall_thug(Creature* creature) : ScriptedAI(creature) {}
|
||||||
|
|
||||||
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
|
{
|
||||||
|
if (TempSummon* summon = me->ToTempSummon())
|
||||||
|
if (Creature* summoner = summon->GetSummonerCreatureBase())
|
||||||
|
summoner->AI()->DoAction(Actions::LousPartingThoughts::ThugReset);
|
||||||
|
|
||||||
|
me->DespawnOrUnsummon();
|
||||||
|
}
|
||||||
|
|
||||||
|
void JustDied(Unit* /*who*/) override
|
||||||
|
{
|
||||||
|
if (TempSummon* summon = me->ToTempSummon())
|
||||||
|
if (Creature* summoner = summon->GetSummonerCreatureBase())
|
||||||
|
summoner->AI()->SetData(0, Data::DataThugDeath);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
Position constexpr ThugPos[4] =
|
||||||
|
{
|
||||||
|
{ -9859.36f, 1332.42f, 41.9859f, 2.49582f },
|
||||||
|
{ -9862.52f, 1332.08f, 41.9859f, 0.855211f },
|
||||||
|
{ -9863.49f, 1335.49f, 41.9859f, 5.63741f },
|
||||||
|
{ -9860.43f, 1335.46f, 41.9859f, 4.11898f },
|
||||||
|
};
|
||||||
|
|
||||||
|
// 42562 - Lous Parting Thoughts Trigger
|
||||||
|
struct npc_westfall_lous_parting_thoughts_trigger : public ScriptedAI
|
||||||
|
{
|
||||||
|
npc_westfall_lous_parting_thoughts_trigger(Creature* creature) : ScriptedAI(creature), _summonGUIDs(), _thugDeathCount(0) {}
|
||||||
|
|
||||||
|
void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
|
||||||
|
{
|
||||||
|
if (!_eventInvokerGUID.IsEmpty())
|
||||||
|
return;
|
||||||
|
|
||||||
|
_eventInvokerGUID = guid;
|
||||||
|
|
||||||
|
_events.ScheduleEvent(Events::LousPartingThoughts::ThugSay0, 0s);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetData(uint32 /*type*/, uint32 data) override
|
||||||
|
{
|
||||||
|
if (data == Data::DataThugDeath)
|
||||||
|
{
|
||||||
|
_thugDeathCount++;
|
||||||
|
|
||||||
|
if (_thugDeathCount >= 4)
|
||||||
|
{
|
||||||
|
_events.ScheduleEvent(Events::LousPartingThoughts::ThugCredit, 0s);
|
||||||
|
DoAction(Actions::LousPartingThoughts::ThugReset);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void DoAction(int32 action) override
|
||||||
|
{
|
||||||
|
switch (action)
|
||||||
|
{
|
||||||
|
case Actions::LousPartingThoughts::ThugReset:
|
||||||
|
_events.ScheduleEvent(Events::LousPartingThoughts::SummonThugs, 60s);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void JustAppeared() override
|
||||||
|
{
|
||||||
|
_events.ScheduleEvent(Events::LousPartingThoughts::SummonThugs, 0s);
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateAI(uint32 diff) override
|
||||||
|
{
|
||||||
|
_events.Update(diff);
|
||||||
|
while (uint32 eventId = _events.ExecuteEvent())
|
||||||
|
{
|
||||||
|
Player* invoker = ObjectAccessor::GetPlayer(*me, _eventInvokerGUID);
|
||||||
|
|
||||||
|
switch (eventId)
|
||||||
|
{
|
||||||
|
case Events::LousPartingThoughts::SummonThugs:
|
||||||
|
for (uint8 i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
if (Creature* thug = me->SummonCreature(Creatures::Thug, ThugPos[i], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60s))
|
||||||
|
_summonGUIDs[i] = thug->GetGUID();
|
||||||
|
}
|
||||||
|
_eventInvokerGUID = ObjectGuid::Empty;
|
||||||
|
_thugDeathCount = 0;
|
||||||
|
break;
|
||||||
|
case Events::LousPartingThoughts::ThugSay0:
|
||||||
|
{
|
||||||
|
Creature* thug1 = ObjectAccessor::GetCreature(*me, _summonGUIDs[0]);
|
||||||
|
if (invoker && thug1)
|
||||||
|
thug1->AI()->Talk(Text::ThugText::ThugSay0, invoker);
|
||||||
|
_events.ScheduleEvent(Events::LousPartingThoughts::ThugSay1, 5s);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Events::LousPartingThoughts::ThugSay1:
|
||||||
|
{
|
||||||
|
Creature* thug2 = ObjectAccessor::GetCreature(*me, _summonGUIDs[1]);
|
||||||
|
if (invoker && thug2)
|
||||||
|
thug2->AI()->Talk(Text::ThugText::ThugSay1, invoker);
|
||||||
|
_events.ScheduleEvent(Events::LousPartingThoughts::ThugSay2, 5s);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Events::LousPartingThoughts::ThugSay2:
|
||||||
|
{
|
||||||
|
Creature* thug2 = ObjectAccessor::GetCreature(*me, _summonGUIDs[1]);
|
||||||
|
if (invoker && thug2)
|
||||||
|
thug2->AI()->Talk(Text::ThugText::ThugSay2, invoker);
|
||||||
|
_events.ScheduleEvent(Events::LousPartingThoughts::ThugSay3, 8s + 500ms);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Events::LousPartingThoughts::ThugSay3:
|
||||||
|
{
|
||||||
|
Creature* thug3 = ObjectAccessor::GetCreature(*me, _summonGUIDs[2]);
|
||||||
|
if (invoker && thug3)
|
||||||
|
thug3->AI()->Talk(Text::ThugText::ThugSay3, invoker);
|
||||||
|
_events.ScheduleEvent(Events::LousPartingThoughts::ThugSay4, 5s);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Events::LousPartingThoughts::ThugSay4:
|
||||||
|
{
|
||||||
|
Creature* thug1 = ObjectAccessor::GetCreature(*me, _summonGUIDs[0]);
|
||||||
|
if (invoker && thug1)
|
||||||
|
{
|
||||||
|
thug1->AI()->Talk(Text::ThugText::ThugSay4, invoker);
|
||||||
|
|
||||||
|
for (ObjectGuid const& guid : _summonGUIDs)
|
||||||
|
if (Creature* thug = ObjectAccessor::GetCreature(*me, guid))
|
||||||
|
thug->SetFacingToObject(invoker);
|
||||||
|
}
|
||||||
|
|
||||||
|
_events.ScheduleEvent(Events::LousPartingThoughts::ThugSay5, 8s + 500ms);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Events::LousPartingThoughts::ThugSay5:
|
||||||
|
{
|
||||||
|
Creature* thug1 = ObjectAccessor::GetCreature(*me, _summonGUIDs[0]);
|
||||||
|
if (invoker && thug1)
|
||||||
|
thug1->AI()->Talk(Text::ThugText::ThugSay5, invoker);
|
||||||
|
|
||||||
|
_events.ScheduleEvent(Events::LousPartingThoughts::ThugSay6, 5s);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Events::LousPartingThoughts::ThugSay6:
|
||||||
|
{
|
||||||
|
Creature* thug1 = ObjectAccessor::GetCreature(*me, _summonGUIDs[0]);
|
||||||
|
if (invoker && thug1)
|
||||||
|
{
|
||||||
|
thug1->AI()->Talk(Text::ThugText::ThugSay6, invoker);
|
||||||
|
|
||||||
|
for (ObjectGuid const& guid : _summonGUIDs)
|
||||||
|
if (Creature* thug = ObjectAccessor::GetCreature(*me, guid))
|
||||||
|
{
|
||||||
|
thug->SetImmuneToAll(false);
|
||||||
|
thug->AI()->AttackStart(invoker);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Events::LousPartingThoughts::ThugCredit:
|
||||||
|
{
|
||||||
|
if (invoker)
|
||||||
|
{
|
||||||
|
invoker->CastSpell(invoker, Spells::HoboInformation, TriggerCastFlags(TRIGGERED_FULL_MASK));
|
||||||
|
for (ObjectGuid tapperGUID : me->GetTapList())
|
||||||
|
{
|
||||||
|
Player* tapper = ObjectAccessor::GetPlayer(*me, tapperGUID);
|
||||||
|
if (!tapper || tapper->GetQuestStatus(Quests::LousPartingThoughts) != QUEST_STATUS_INCOMPLETE || tapper->GetDistance(me) > 75.f)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
tapper->CastSpell(tapper, Spells::HoboInformation, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_events.ScheduleEvent(Events::LousPartingThoughts::ThugShoot1, 1s + 500ms);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Events::LousPartingThoughts::ThugShoot1:
|
||||||
|
{
|
||||||
|
if (invoker)
|
||||||
|
me->PlayDistanceSound(Sounds::Shooting, invoker);
|
||||||
|
|
||||||
|
_events.ScheduleEvent(Events::LousPartingThoughts::ThugShoot2, 1s + 200ms);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Events::LousPartingThoughts::ThugShoot2:
|
||||||
|
{
|
||||||
|
if (invoker)
|
||||||
|
me->PlayDistanceSound(Sounds::Shooting, invoker);
|
||||||
|
|
||||||
|
_events.ScheduleEvent(Events::LousPartingThoughts::ThugScream, 1s + 200ms);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Events::LousPartingThoughts::ThugScream:
|
||||||
|
{
|
||||||
|
if (invoker)
|
||||||
|
me->PlayDistanceSound(Sounds::Scream, invoker);
|
||||||
|
|
||||||
|
_events.ScheduleEvent(Events::LousPartingThoughts::ThugWarning, 2s + 500ms);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Events::LousPartingThoughts::ThugWarning:
|
||||||
|
{
|
||||||
|
if (invoker)
|
||||||
|
Talk(Text::ThugText::SayWarning, invoker);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
EventMap _events;
|
||||||
|
ObjectGuid _eventInvokerGUID;
|
||||||
|
std::array<ObjectGuid, 4> _summonGUIDs;
|
||||||
|
uint32 _thugDeathCount;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 42390 - Areatrigger
|
||||||
|
class at_westfall_small_time_hustler : public AreaTriggerScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
at_westfall_small_time_hustler() : AreaTriggerScript("at_westfall_small_time_hustler") {}
|
||||||
|
|
||||||
|
bool OnTrigger(Player* player, AreaTriggerEntry const* /*at*/) override
|
||||||
|
{
|
||||||
|
if (player->IsAlive())
|
||||||
|
if (Creature* lousPartingThoughtsTrigger = player->FindNearestCreature(Creatures::SmallTimeHustler, 10.0f, true))
|
||||||
|
lousPartingThoughtsTrigger->AI()->SetGUID(player->GetGUID(), 0);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 42390 - Small Time Hustler
|
||||||
|
struct npc_westfall_small_time_hustler : public ScriptedAI
|
||||||
|
{
|
||||||
|
npc_westfall_small_time_hustler(Creature* creature) : ScriptedAI(creature) {}
|
||||||
|
|
||||||
|
void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
|
||||||
|
{
|
||||||
|
if (!_eventInvokerGUID.IsEmpty())
|
||||||
|
return;
|
||||||
|
|
||||||
|
_eventInvokerGUID = guid;
|
||||||
|
|
||||||
|
_events.ScheduleEvent(Events::LousPartingThoughts::HustlerSay0, 0s);
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateAI(uint32 diff) override
|
||||||
|
{
|
||||||
|
_events.Update(diff);
|
||||||
|
while (uint32 eventId = _events.ExecuteEvent())
|
||||||
|
{
|
||||||
|
switch (eventId)
|
||||||
|
{
|
||||||
|
case Events::LousPartingThoughts::HustlerSay0:
|
||||||
|
{
|
||||||
|
Player* invoker = ObjectAccessor::GetPlayer(*me, _eventInvokerGUID);
|
||||||
|
if (invoker)
|
||||||
|
{
|
||||||
|
me->SetFacingToObject(invoker);
|
||||||
|
Talk(Text::SmallTimeHustlerText::HustlerSay0, invoker);
|
||||||
|
_events.ScheduleEvent(Events::LousPartingThoughts::HustlerSay1, 4s);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Events::LousPartingThoughts::HustlerSay1:
|
||||||
|
{
|
||||||
|
Player* invoker = ObjectAccessor::GetPlayer(*me, _eventInvokerGUID);
|
||||||
|
if (invoker)
|
||||||
|
{
|
||||||
|
Talk(Text::SmallTimeHustlerText::HustlerSay1, invoker);
|
||||||
|
_events.ScheduleEvent(Events::LousPartingThoughts::HustlerEventReset, 60s);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Events::LousPartingThoughts::HustlerEventReset:
|
||||||
|
{
|
||||||
|
_eventInvokerGUID = ObjectGuid::Empty;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
EventMap _events;
|
||||||
|
ObjectGuid _eventInvokerGUID;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddSC_westfall()
|
void AddSC_westfall()
|
||||||
@@ -638,6 +1010,13 @@ void AddSC_westfall()
|
|||||||
// Creature
|
// Creature
|
||||||
RegisterCreatureAI(npc_westfall_overloaded_harvest_golem);
|
RegisterCreatureAI(npc_westfall_overloaded_harvest_golem);
|
||||||
RegisterCreatureAI(npc_westfall_hobo_witness);
|
RegisterCreatureAI(npc_westfall_hobo_witness);
|
||||||
|
RegisterCreatureAI(npc_westfall_thug);
|
||||||
|
RegisterCreatureAI(npc_westfall_lous_parting_thoughts_trigger);
|
||||||
|
RegisterCreatureAI(npc_westfall_small_time_hustler);
|
||||||
|
|
||||||
|
// Areatrigger
|
||||||
|
new at_westfall_two_shoed_lou_thugs();
|
||||||
|
new at_westfall_small_time_hustler();
|
||||||
|
|
||||||
// Spells
|
// Spells
|
||||||
RegisterSpellScript(spell_westfall_unbound_energy);
|
RegisterSpellScript(spell_westfall_unbound_energy);
|
||||||
|
|||||||
Reference in New Issue
Block a user