aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlee <leelf_00@126.com>2022-09-11 23:33:25 +0800
committerGitHub <noreply@github.com>2022-09-11 17:33:25 +0200
commitfea9de5b1707a268e8a3131b5707aa908866257c (patch)
treee773c70385fab95ba3de43744ceaf067a03081b6
parenta55a566602c323fc6950994d87c55552531e8688 (diff)
Scripts/Battle for Mount Hyjal:Fix wrong npc text,trash movment,archimode last phase (#27910)
* Fix wrong npc text,trash movment,archimode last phase 1.Fix wrong npc text for Jania,Thrall,Tyrande. 2.Change Hyjal trash movement from walk to run. 3.Fix archimode drain worldtree event. 4.Fix archimode below 10% hp phase.Case Protection of elune on player. * fix code style fix code style * fix wrong type * Revert "fix wrong type" This reverts commit 204c45f7d76cb8f7e3a444db1d7bebb341ad931c. * fix wrong type * Update boss_archimonde.cpp * add missing Creature Text * fix code style * Update hyjalAI.cpp * do some work to prevent respawn mobs in combat * remove dup yell at alliance base * fix code style * fix SPELL_METEOR unvisiable when spawn Giant Infernal * change to DoCastSelf * hide archimonde doomfire spirit visual * fix code style * fix SQL warning when startup server * fix code style * move SetRun out of constructor * remove target list * move setRun * fix code style * Change npctext ID to high ID.Fill text into Creature Text Change npctext ID to high ID. Fill text into Creature Text. * Remove Magic Numbers * change npctext high ID * fix change high npc_text id in code * remove setCanFly,add flight state to db * change npc_text id * change npc yell condition after second boss dead * update npc_text IDs taken from sniff file. Updated IDs taken from sniff file provided by Aokromes. * remove MoveInLineOfSight * move protection_of_elune immuity effect to spell script * move worldtree channel target to db Move worldtree channel target to db Fix wrong position and movement_type of worldtree channel target * update wrong npc_text IDs in code * remove CastProtectionOfElune * remove SetVisible(false),change flags_txtra of doomfire(18095) and doomfire_spirit(18104) * update sql * fix compile error * revent spawntime,move guards say slay and say death to db * Move code from Initialize() to Reset() Move code from Initialize() to Reset() Move code from Initialize() to Reset() Update boss_archimonde.cpp * remove unneeeary ->AI() * Update hyjal_trash.cpp * Update src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp * Update src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp * Rename 9999_99_99_world.sql to 2022_09_11_00_world.sql Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
-rw-r--r--sql/updates/world/3.3.5/2022_09_11_00_world.sql84
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp79
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp29
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp16
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h6
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp45
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp5
7 files changed, 233 insertions, 31 deletions
diff --git a/sql/updates/world/3.3.5/2022_09_11_00_world.sql b/sql/updates/world/3.3.5/2022_09_11_00_world.sql
new file mode 100644
index 00000000000..368b24c74ef
--- /dev/null
+++ b/sql/updates/world/3.3.5/2022_09_11_00_world.sql
@@ -0,0 +1,84 @@
+--
+-- Add missing gossip_menu
+DELETE FROM `gossip_menu` WHERE (`MenuID`,`TextID`) IN ((7552,9380),(7581,9396),(7581,9398));
+INSERT INTO `gossip_menu`(`MenuID`, `TextID`, `VerifiedBuild`) VALUES
+(7552, 9380, 0),
+(7581, 9396, 0),
+(7581, 9398, 0);
+
+-- Add missing npc_text
+DELETE FROM `npc_text` WHERE `ID` IN (9396,9398);
+INSERT INTO `npc_text`(`ID`, `text0_0`, `text0_1`, `BroadcastTextID0`, `lang0`, `Probability0`, `EmoteDelay0_0`, `Emote0_0`, `EmoteDelay0_1`, `Emote0_1`, `EmoteDelay0_2`, `Emote0_2`, `text1_0`, `text1_1`, `BroadcastTextID1`, `lang1`, `Probability1`, `EmoteDelay1_0`, `Emote1_0`, `EmoteDelay1_1`, `Emote1_1`, `EmoteDelay1_2`, `Emote1_2`, `text2_0`, `text2_1`, `BroadcastTextID2`, `lang2`, `Probability2`, `EmoteDelay2_0`, `Emote2_0`, `EmoteDelay2_1`, `Emote2_1`, `EmoteDelay2_2`, `Emote2_2`, `text3_0`, `text3_1`, `BroadcastTextID3`, `lang3`, `Probability3`, `EmoteDelay3_0`, `Emote3_0`, `EmoteDelay3_1`, `Emote3_1`, `EmoteDelay3_2`, `Emote3_2`, `text4_0`, `text4_1`, `BroadcastTextID4`, `lang4`, `Probability4`, `EmoteDelay4_0`, `Emote4_0`, `EmoteDelay4_1`, `Emote4_1`, `EmoteDelay4_2`, `Emote4_2`, `text5_0`, `text5_1`, `BroadcastTextID5`, `lang5`, `Probability5`, `EmoteDelay5_0`, `Emote5_0`, `EmoteDelay5_1`, `Emote5_1`, `EmoteDelay5_2`, `Emote5_2`, `text6_0`, `text6_1`, `BroadcastTextID6`, `lang6`, `Probability6`, `EmoteDelay6_0`, `Emote6_0`, `EmoteDelay6_1`, `Emote6_1`, `EmoteDelay6_2`, `Emote6_2`, `text7_0`, `text7_1`, `BroadcastTextID7`, `lang7`, `Probability7`, `EmoteDelay7_0`, `Emote7_0`, `EmoteDelay7_1`, `Emote7_1`, `EmoteDelay7_2`, `Emote7_2`, `VerifiedBuild`) VALUES
+(9396, 'Outstanding! Kaz\'rogal\'s death cry should strike fear into the core of the Burning Legion. They now know the power your forces possess, so expect the worst the Legion can offer.', '', 15444, 0, 1, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
+(9398, 'Outstanding! Killing a Pit Lord such as Azgalor is no small feat, my friend. If we had more time, I would love to hear the story of you and your companions. Archimonde will not give us that pause, however. My scouts have already reported that the Legion is amassing an immense force outside our camp, and Archimonde is very close to the World Tree. We are evacuating with the help of Lady Proudmoore. You should head to the World Tree at once. The fate of our world is still undecided.', '', 15448, 0, 1, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+
+-- Trash Mobs Creature Text
+DELETE FROM `creature_text` WHERE `CreatureID` IN (17899,17905,17919,17934,17932,17933,17936) AND `GroupID` IN (0,1);
+DELETE FROM `creature_text` WHERE `CreatureID`=17772 AND `GroupID`=7;
+INSERT INTO `creature_text`(`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
+(17899, 0, 0, 'Lambs for the slaughter!', 12, 0, 100, 0, 0, 0, 18450, 0, 'Shadowy Necromancer say slay'),
+(17899, 1, 0, 'A pleasure... to serve the master.', 12, 0, 100, 0, 0, 0, 18448, 0, 'Shadowy Necromancer say death'),
+(17899, 1, 1, 'My life... to the master.', 12, 0, 100, 0, 0, 0, 18447, 0, 'Shadowy Necromancer say death'),
+(17899, 1, 2, 'You will... ultimately fail.', 12, 0, 100, 0, 0, 0, 18446, 0, 'Shadowy Necromancer say death'),
+(17905, 0, 0, 'Let this torment end!!', 12, 0, 100, 0, 0, 0, 18451, 0, 'Banshee say slay'),
+(17905, 0, 1, 'I obey.', 12, 0, 100, 0, 0, 0, 18454, 0, 'Banshee say slay'),
+(17905, 1, 0, 'I am... released?', 12, 0, 100, 0, 0, 0, 18452, 0, 'Banshee say death'),
+(17905, 1, 1, 'Is it really... over?', 12, 0, 100, 0, 0, 0, 18453, 0, 'Banshee say death'),
+(17919, 0, 0, 'Back, hold them back!', 12, 0, 100, 0, 0, 0, 18457, 0, 'Alliance Footman say slay'),
+(17919, 0, 1, 'Let these monsters taste cold steel!', 12, 0, 100, 0, 0, 0, 18456, 0, 'Alliance Footman say slay'),
+(17919, 1, 0, 'Agghh!', 12, 0, 100, 0, 0, 0, 18458, 0, 'Alliance Footman say death'),
+(17934, 0, 0, 'Dis no good....', 12, 0, 100, 0, 0, 0, 18501, 0, 'Horde Headhunter say slay'),
+(17934, 0, 1, 'Take their heads!', 12, 0, 100, 0, 0, 0, 18499, 0, 'Horde Headhunter say slay'),
+(17934, 0, 2, 'We kill \'em good, mon.', 12, 0, 100, 0, 0, 0, 18500, 0, 'Horde Headhunter say slay'),
+(17934, 0, 3, 'You stay dead.', 12, 0, 100, 0, 0, 0, 18503, 0, 'Horde Headhunter say slay'),
+(17934, 0, 4, 'Da Legion gonna pay.', 12, 0, 100, 0, 0, 0, 18504, 0, 'Horde Headhunter say slay'),
+(17934, 1, 0, 'It all over... now.', 12, 0, 100, 0, 0, 0, 18502, 0, 'Horde Headhunter say death'),
+(17932, 0, 0, 'Destroy them all!', 12, 0, 100, 0, 0, 0, 18486, 0, 'Horde Grunt say slay'),
+(17932, 0, 1, 'Have at them! Lok-Tar!', 12, 0, 100, 0, 0, 0, 18485, 0, 'Horde Grunt say slay'),
+(17932, 0, 2, 'Spill their... blood!', 12, 0, 100, 0, 0, 0, 18488, 0, 'Horde Grunt say slay'),
+(17932, 0, 3, 'Another one down!', 12, 0, 100, 0, 0, 0, 18490, 0, 'Horde Grunt say slay'),
+(17932, 0, 4, 'Demon filth!', 12, 0, 100, 0, 0, 0, 18489, 0, 'Horde Grunt say slay'),
+(17932, 1, 0, 'Keep... fighting!', 12, 0, 100, 0, 0, 0, 18487, 0, 'Horde Grunt say death'),
+(17933, 0, 0, 'For the Earth Mother!', 12, 0, 100, 0, 0, 0, 18493, 0, 'Tauren Warrior say slay'),
+(17933, 0, 1, 'Crush them!', 12, 0, 100, 0, 0, 0, 18494, 0, 'Tauren Warrior say slay'),
+(17933, 0, 2, 'Balance must be restored!', 12, 0, 100, 0, 0, 0, 18497, 0, 'Tauren Warrior say slay'),
+(17933, 0, 3, 'This world is not for you!', 12, 0, 100, 0, 0, 0, 18498, 0, 'Tauren Warrior say slay'),
+(17933, 1, 0, 'I return... to the earth.', 12, 0, 100, 0, 0, 0, 18495, 0, 'Tauren Warrior say death'),
+(17933, 1, 1, 'My spirit... goes on.', 12, 0, 100, 0, 0, 0, 18496, 0, 'Tauren Warrior say death'),
+(17936, 0, 1, 'I am one... with all.', 12, 0, 100, 0, 0, 0, 18510, 0, 'Horde Shaman say slay'),
+(17936, 1, 0, 'My spirit... goes on.', 12, 0, 100, 0, 0, 0, 18496, 0, 'Horde Shaman say death'),
+(17772, 7, 0, '%s begins channelling a massive teleport spell. ', 16, 0, 100, 0, 0, 0, 15310, 0, 'jaina hyjal horde base SUCCESS');
+
+-- enable gargoyle frost wyrm fly
+DELETE FROM `creature_template_movement` WHERE `CreatureID` IN (17906,17907);
+INSERT INTO `creature_template_movement`(`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`, `Chase`, `Random`, `InteractionPauseTimer`) VALUES
+(17906, 0, 0, 1, 0, 0, 0, NULL),
+(17907, 0, 0, 1, 0, 0, 0, NULL);
+
+-- add protection of elune(38528) spell script
+DELETE FROM `spell_script_names` WHERE `spell_id`=38528;
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(38528,'spell_protection_of_elune');
+
+-- change wrong position and movement type of worldtree channel target
+DELETE FROM `creature` WHERE `guid`=6747;
+INSERT INTO `creature`(`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES
+(6747, 22418, 534, 0, 0, 1, 1, 0, 0, 5502.2876, -3525.4714, 1607.9094, 2.61799, 7200, 0, 0, 1, 0, 0, 0, 0, 0, '', 0);
+
+-- update doomfire(18095) and doomfire_spirit(18104) flag_extra to 128
+UPDATE `creature_template` SET `flags_extra` = `flags_extra`|128 WHERE `entry` IN (18095,18104);
+
+-- add say slay and death text for guards
+DELETE FROM `smart_scripts` WHERE (`entryorguid`,`source_type`,`id`,`link`) IN ((17919,0,1,0),(17919,0,2,0),(17932,0,1,0),(17932,0,2,0),(17933,0,1,0),(17933,0,2,0),(17934,0,0,0),(17934,0,1,0),(17936,0,3,0),(17936,0,4,0));
+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`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(17919, 0, 1, 0, 5, 0, 100, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Alliance Footman - In Combat - Say Slay'),
+(17919, 0, 2, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Alliance Footman - In Combat - Say Death'),
+(17932, 0, 1, 0, 5, 0, 100, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Horde Grunt - In Combat - Say Slay'),
+(17932, 0, 2, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Horde Grunt - In Combat - Say Death'),
+(17933, 0, 1, 0, 5, 0, 100, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Tauren Warrior - In Combat - Say Slay'),
+(17933, 0, 2, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Tauren Warrior - In Combat - Say Death'),
+(17934, 0, 0, 0, 5, 0, 100, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Horde Headhunter - In Combat - Say Slay'),
+(17934, 0, 1, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Horde Headhunter - In Combat - Say Death'),
+(17936, 0, 3, 0, 5, 0, 100, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Horde Shaman - In Combat - Say Slay'),
+(17936, 0, 4, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Horde Shaman - In Combat - Say Death');
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (17919,17934,17932,17933,17936);
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
index 319d5b26823..f86a813e490 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
@@ -53,6 +53,7 @@ enum Spells
SPELL_DRAIN_WORLD_TREE_TRIGGERED = 39141,
SPELL_FINGER_OF_DEATH = 31984,
+ SPELL_FINGER_OF_DEATH_LAST_PHASE = 32111,
SPELL_HAND_OF_DEATH = 35354,
SPELL_AIR_BURST = 32014,
SPELL_GRIP_OF_THE_LEGION = 31972,
@@ -78,7 +79,9 @@ enum Events
EVENT_AIR_BURST,
EVENT_DOOMFIRE,
EVENT_DISTANCE_CHECK, // This checks if he's too close to the World Tree (75 yards from a point on the tree), if true then he will enrage
- EVENT_SUMMON_WHISP
+ EVENT_SUMMON_WHISP,
+ EVENT_PROTECTION_OF_ELUNE,
+ EVENT_FINGER_OF_DEATH_LAST_PHASE
};
enum Summons
@@ -94,6 +97,8 @@ enum Actions
ACTION_CHANNEL_WORLD_TREE
};
+Position const NordrassilLoc = { 5503.713f, -3523.436f, 1608.781f, 0.0f };
+
class npc_ancient_wisp : public CreatureScript
{
public:
@@ -275,7 +280,6 @@ public:
void Initialize()
{
- DoomfireSpiritGUID.Clear();
SoulChargeCount = 0;
WispCount = 0; // When ~30 wisps are summoned, Archimonde dies
@@ -289,18 +293,25 @@ public:
void InitializeAI() override
{
BossAI::InitializeAI();
- DoAction(ACTION_CHANNEL_WORLD_TREE);
}
void Reset() override
{
Initialize();
_Reset();
- me->RemoveAllAuras(); // Reset Soul Charge auras.
+ DoomfireSpiritGUID.Clear();
+ summons.DespawnAll();
+ WorldtreeTragetGUID = instance->GetGuidData(DATA_CHANNEL_TARGET);
+ if (Creature* WorldtreeTraget = ObjectAccessor::GetCreature(*me, WorldtreeTragetGUID))
+ {
+ DoCast(WorldtreeTraget, SPELL_DRAIN_WORLD_TREE);
+ }
+ me->RemoveAllAuras(); // Reset Soul Charge auras.
}
void JustEngagedWith(Unit* who) override
{
+ me->InterruptSpell(CURRENT_CHANNELED_SPELL);
Talk(SAY_AGGRO);
BossAI::JustEngagedWith(who);
events.ScheduleEvent(EVENT_FEAR, 42s);
@@ -387,13 +398,27 @@ public:
DoAction(ACTION_ENRAGE);
events.ScheduleEvent(EVENT_DISTANCE_CHECK, 5s);
break;
+ case EVENT_PROTECTION_OF_ELUNE: // hp below 10% only cast finger of death
+ events.Reset();
+ events.ScheduleEvent(EVENT_HAND_OF_DEATH, 1s);
+ events.ScheduleEvent(EVENT_FINGER_OF_DEATH_LAST_PHASE, 1s);
+ events.ScheduleEvent(EVENT_SUMMON_WHISP, 1s);
+ DoCastAOE(SPELL_PROTECTION_OF_ELUNE);
+ break;
case EVENT_SUMMON_WHISP:
DoSpawnCreature(NPC_ANCIENT_WISP, float(rand32() % 40), float(rand32() % 40), 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15s);
++WispCount;
if (WispCount >= 30)
+ {
me->KillSelf();
+ return;
+ }
events.ScheduleEvent(EVENT_SUMMON_WHISP, 1500ms);
break;
+ case EVENT_FINGER_OF_DEATH_LAST_PHASE:
+ DoCast(SelectTarget(SelectTargetMethod::Random, 0), SPELL_FINGER_OF_DEATH_LAST_PHASE);
+ events.ScheduleEvent(EVENT_FINGER_OF_DEATH_LAST_PHASE, 1s);
+ break;
default:
break;
}
@@ -410,11 +435,9 @@ public:
{
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MoveIdle();
-
// All members of raid must get this buff
- DoCastAOE(SPELL_PROTECTION_OF_ELUNE, true);
+ events.ScheduleEvent(EVENT_PROTECTION_OF_ELUNE, 1ms);
HasProtected = true;
- events.ScheduleEvent(EVENT_SUMMON_WHISP, 1500ms);
}
}
}
@@ -457,6 +480,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
Talk(SAY_DEATH);
+ summons.DespawnAll();
_JustDied();
// @todo: remove this when instance script gets updated, kept for compatibility only
instance->SetData(DATA_ARCHIMONDE, DONE);
@@ -517,7 +541,6 @@ public:
me->SummonCreature(NPC_DOOMFIRE_SPIRIT,
target->GetPositionX()+15.0f, target->GetPositionY()+15.0f, target->GetPositionZ(), 0,
TEMPSUMMON_TIMED_DESPAWN, 27s);
-
me->SummonCreature(NPC_DOOMFIRE,
target->GetPositionX()-15.0f, target->GetPositionY()-15.0f, target->GetPositionZ(), 0,
TEMPSUMMON_TIMED_DESPAWN, 27s);
@@ -525,6 +548,7 @@ public:
private:
ObjectGuid DoomfireSpiritGUID;
+ ObjectGuid WorldtreeTragetGUID;
uint8 SoulChargeCount;
uint8 WispCount;
uint32 _chargeSpell;
@@ -572,6 +596,44 @@ class spell_archimonde_drain_world_tree_dummy : public SpellScriptLoader
}
};
+// Protection of Elune 38528
+class spell_protection_of_elune : public AuraScript
+{
+ PrepareAuraScript(spell_protection_of_elune);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo(
+ {
+ SPELL_PROTECTION_OF_ELUNE
+ });
+ }
+
+ void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ Unit* target = GetTarget();
+ target->ApplySpellImmune(SPELL_HAND_OF_DEATH, IMMUNITY_ID, SPELL_HAND_OF_DEATH, true);
+ target->ApplySpellImmune(SPELL_FINGER_OF_DEATH, IMMUNITY_ID, SPELL_FINGER_OF_DEATH, true);
+ target->ApplySpellImmune(SPELL_FINGER_OF_DEATH_LAST_PHASE, IMMUNITY_ID, SPELL_FINGER_OF_DEATH_LAST_PHASE, true);
+ target->ApplySpellImmune(0, IMMUNITY_ID, SPELL_FINGER_OF_DEATH_LAST_PHASE, true);
+ }
+
+ void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ Unit* target = GetTarget();
+ target->ApplySpellImmune(SPELL_HAND_OF_DEATH, IMMUNITY_ID, SPELL_HAND_OF_DEATH, false);
+ target->ApplySpellImmune(SPELL_FINGER_OF_DEATH, IMMUNITY_ID, SPELL_FINGER_OF_DEATH, false);
+ target->ApplySpellImmune(SPELL_FINGER_OF_DEATH_LAST_PHASE, IMMUNITY_ID, SPELL_FINGER_OF_DEATH_LAST_PHASE, false);
+ target->ApplySpellImmune(0, IMMUNITY_ID, SPELL_FINGER_OF_DEATH_LAST_PHASE, false);
+ }
+
+ void Register() override
+ {
+ AfterEffectApply += AuraEffectApplyFn(spell_protection_of_elune::HandleEffectApply, EFFECT_0, SPELL_AURA_SCHOOL_IMMUNITY, AURA_EFFECT_HANDLE_REAL);
+ AfterEffectRemove += AuraEffectRemoveFn(spell_protection_of_elune::HandleEffectRemove, EFFECT_0, SPELL_AURA_SCHOOL_IMMUNITY, AURA_EFFECT_HANDLE_REAL);
+ }
+};
+
void AddSC_boss_archimonde()
{
new boss_archimonde();
@@ -579,4 +641,5 @@ void AddSC_boss_archimonde()
new npc_doomfire_targetting();
new npc_ancient_wisp();
new spell_archimonde_drain_world_tree_dummy();
+ RegisterSpellScript(spell_protection_of_elune);
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp
index 8070906e295..3b8a5ebcc1a 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal.cpp
@@ -53,6 +53,11 @@ enum GOSSIPS
GOSSIP_ITEM_TYRANDE_OID = 0
};
+enum NPCTEXTS
+{
+ JAINA_RETREAT_ALLIANCE_BASE = 5
+};
+
#define ITEM_TEAR_OF_GODDESS 24494
#define GOSSIP_ITEM_GM1 "[GM] Toggle Debug Timers"
@@ -94,6 +99,7 @@ class npc_jaina_proudmoore : public CreatureScript
StartEvent(player);
break;
case GOSSIP_ACTION_INFO_DEF + 3:
+ me->AI()->Talk(JAINA_RETREAT_ALLIANCE_BASE);
Retreat();
break;
case GOSSIP_ACTION_INFO_DEF:
@@ -112,16 +118,23 @@ class npc_jaina_proudmoore : public CreatureScript
uint32 RageEncounter = GetInstanceData(DATA_RAGEWINTERCHILLEVENT);
uint32 AnetheronEncounter = GetInstanceData(DATA_ANETHERONEVENT);
if (RageEncounter == NOT_STARTED)
+ {
AddGossipItemFor(player, GOSSIP_ITEM_BEGIN_ALLY_MID, GOSSIP_ITEM_BEGIN_ALLY_OID, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ SendGossipMenuFor(player, 9168, me->GetGUID());
+ }
else if (RageEncounter == DONE && AnetheronEncounter == NOT_STARTED)
+ {
AddGossipItemFor(player, GOSSIP_ITEM_ANETHERON_MID, GOSSIP_ITEM_ANETHERON_OID, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ SendGossipMenuFor(player, 9380, me->GetGUID());
+ }
else if (RageEncounter == DONE && AnetheronEncounter == DONE)
+ {
AddGossipItemFor(player, GOSSIP_ITEM_ALLY_RETREAT_MID, GOSSIP_ITEM_ALLY_RETREAT_OID, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
-
+ SendGossipMenuFor(player, 9387, me->GetGUID());
+ }
if (player->IsGameMaster())
AddGossipItemFor(player, GOSSIP_ICON_TRAINER, GOSSIP_ITEM_GM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
- SendGossipMenuFor(player, 907, me->GetGUID());
return true;
}
};
@@ -188,17 +201,25 @@ class npc_thrall : public CreatureScript
uint32 KazrogalEvent = GetInstanceData(DATA_KAZROGALEVENT);
uint32 AzgalorEvent = GetInstanceData(DATA_AZGALOREVENT);
if (KazrogalEvent == NOT_STARTED)
+ {
AddGossipItemFor(player, GOSSIP_ITEM_BEGIN_HORDE_MID, GOSSIP_ITEM_BEGIN_HORDE_OID, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+ SendGossipMenuFor(player, 9225, me->GetGUID());
+ }
else if (KazrogalEvent == DONE && AzgalorEvent == NOT_STARTED)
+ {
AddGossipItemFor(player, GOSSIP_ITEM_AZGALOR_MID, GOSSIP_ITEM_AZGALOR_OID, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
+ SendGossipMenuFor(player, 9396, me->GetGUID());
+ }
else if (AzgalorEvent == DONE)
+ {
AddGossipItemFor(player, GOSSIP_ITEM_HORDE_RETREAT_MID, GOSSIP_ITEM_HORDE_RETREAT_OID, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
+ SendGossipMenuFor(player, 9398, me->GetGUID());
+ }
}
if (player->IsGameMaster())
AddGossipItemFor(player, GOSSIP_ICON_TRAINER, GOSSIP_ITEM_GM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
- SendGossipMenuFor(player, 907, me->GetGUID());
return true;
}
};
@@ -244,7 +265,7 @@ class npc_tyrande_whisperwind : public CreatureScript
// Only let them get item if Azgalor is dead.
if (AzgalorEvent == DONE && !player->HasItemCount(ITEM_TEAR_OF_GODDESS))
AddGossipItemFor(player, GOSSIP_ITEM_TYRANDE_MID, GOSSIP_ITEM_TYRANDE_OID, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
- SendGossipMenuFor(player, 907, me->GetGUID());
+ SendGossipMenuFor(player, 9410, me->GetGUID());
return true;
}
};
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
index 3d9e1d8b687..a3620020435 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
@@ -40,7 +40,10 @@ enum Spawns
SPAWN_NEAR_TOWER = 2,
};
-#define YELL_HURRY "Hurry, we don't have much time"
+enum NPCTEXTS
+{
+ JAINA_RETREAT_HORDE_BASE = 7
+};
// Locations for summoning gargoyls and frost wyrms in special cases
float SpawnPointSpecial[3][3]=
@@ -392,7 +395,7 @@ void hyjalAI::Reset()
{
case JAINA:
Faction = 0;
- DoCast(me, SPELL_BRILLIANCE_AURA, true);
+ DoCastSelf(SPELL_BRILLIANCE_AURA, true);
break;
case THRALL:
@@ -401,6 +404,7 @@ void hyjalAI::Reset()
case TYRANDE:
Faction = 2;
+ DoCastSelf(SPELL_TRUESHOT_AURA, true);
break;
}
@@ -504,6 +508,7 @@ void hyjalAI::SummonCreature(uint32 entry, float Base[4][3])
++EnemyCount;
creature->SetWalk(false);
+ ENSURE_AI(hyjal_trashAI, creature->AI())->SetRun();
creature->setActive(true);
creature->SetFarVisible(true);
switch (entry)
@@ -831,7 +836,10 @@ void hyjalAI::UpdateAI(uint32 diff)
}
else if (BossGUID[i] == BossGUID[1])
{
- Talk(SUCCESS);
+ if (me->GetEntry() == THRALL) // thrall yell success after boss deaded,jaina yell success after select gossip
+ {
+ Talk(SUCCESS);
+ }
SecondBossDead = true;
}
EventBegun = false;
@@ -936,7 +944,6 @@ void hyjalAI::WaypointReached(uint32 waypointId, uint32 /*pathId*/)
{
if (waypointId == 1 || (waypointId == 0 && me->GetEntry() == THRALL))
{
- me->Yell(YELL_HURRY, LANG_UNIVERSAL);
WaitForTeleport = true;
TeleportTimer = 20000;
if (me->GetEntry() == JAINA)
@@ -946,6 +953,7 @@ void hyjalAI::WaypointReached(uint32 waypointId, uint32 /*pathId*/)
if (Creature* creature = ObjectAccessor::GetCreature(*me, DummyGuid))
{
hyjalAI* ai = ENSURE_AI(hyjalAI, creature->AI());
+ ai->Talk(JAINA_RETREAT_HORDE_BASE);
ai->DoMassTeleport = true;
ai->MassTeleportTimer = 20000;
creature->CastSpell(me, SPELL_MASS_TELEPORT, false);
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h
index 331c04b6066..acb08d891b9 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.h
@@ -36,7 +36,11 @@ enum SpellIds
//Thrall spells
SPELL_CHAIN_LIGHTNING = 31330,
- SPELL_SUMMON_DIRE_WOLF = 31331
+ SPELL_SUMMON_DIRE_WOLF = 31331,
+
+ //Tyrande spells
+ SPELL_TRUESHOT_AURA = 31519,
+ SPELL_STARFALL = 20687
};
struct Wave
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
index f607c7faeb8..38511e9ea4d 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
@@ -47,6 +47,12 @@ enum Spells
SPELL_EXPLODING_SHOT = 7896,
};
+enum HyjalCreatureText
+{
+ TRASH_SAY_SLAY = 0,
+ TRASH_SAY_DEATH = 1,
+};
+
float HordeWPs[8][3]=//basic waypoints from spawn to leader
{
{5492.91f, -2404.61f, 1462.63f},
@@ -476,8 +482,6 @@ public:
{
if (Creature* trigger = me->SummonCreature(NPC_WORLD_TRIGGER_TINY, me->GetPositionWithOffset({ 8.0f, 8.0f, frand(25.0f, 35.0f), 0.0f }), TEMPSUMMON_TIMED_DESPAWN, 1s))
{
- trigger->SetVisible(false);
- trigger->SetFaction(me->GetFaction());
trigger->SetDisableGravity(true);
trigger->CastSpell(me, SPELL_METEOR, true);
}
@@ -807,6 +811,7 @@ public:
void KilledUnit(Unit* /*victim*/) override
{
+ Talk(TRASH_SAY_SLAY);
switch (urand(0, 2))
{
case 0:
@@ -825,6 +830,12 @@ public:
void JustEngagedWith(Unit* /*who*/) override { }
+ void JustDied(Unit* killer) override
+ {
+ hyjal_trashAI::JustDied(killer);
+ Talk(TRASH_SAY_DEATH);
+ }
+
void UpdateAI(uint32 diff) override
{
hyjal_trashAI::UpdateAI(diff);
@@ -923,6 +934,17 @@ public:
}
}
+ void KilledUnit(Unit* /*victim*/) override
+ {
+ Talk(TRASH_SAY_SLAY);
+ }
+
+ void JustDied(Unit* killer) override
+ {
+ hyjal_trashAI::JustDied(killer);
+ Talk(TRASH_SAY_DEATH);
+ }
+
void JustEngagedWith(Unit* /*who*/) override { }
void UpdateAI(uint32 diff) override
@@ -1187,7 +1209,6 @@ public:
void Reset() override
{
Initialize();
- me->SetDisableGravity(true);
}
void WaypointReached(uint32 waypointId, uint32 /*pathId*/) override
@@ -1231,21 +1252,20 @@ public:
{
if (!go)
{
- go = true;
+
if (!useFlyPath)
{
for (uint8 i = 0; i < 3; ++i)
AddWaypoint(i, FrostWyrmWPs[i][0], FrostWyrmWPs[i][1], FrostWyrmWPs[i][2]);
- Start(false, true);
- SetDespawnAtEnd(false);
}
else
{//fly path FlyPathWPs
for (uint8 i = 0; i < 3; ++i)
AddWaypoint(i, FlyPathWPs[i][0]+irand(-10, 10), FlyPathWPs[i][1]+irand(-10, 10), FlyPathWPs[i][2]);
- Start(false, true);
- SetDespawnAtEnd(false);
}
+ go = true;
+ Start(false, true);
+ SetDespawnAtEnd(false);
}
}
@@ -1317,7 +1337,6 @@ public:
void Reset() override
{
Initialize();
- me->SetDisableGravity(true);
}
void WaypointReached(uint32 waypointId, uint32 /*pathId*/) override
@@ -1357,19 +1376,17 @@ public:
{
if (!go)
{
- go = true;
if (!useFlyPath)
{
for (uint8 i = 0; i < 3; ++i)
AddWaypoint(i, GargoyleWPs[i][0]+irand(-10, 10), GargoyleWPs[i][1]+irand(-10, 10), GargoyleWPs[i][2]);
- Start(false, true);
- SetDespawnAtEnd(false);
}else{//fly path FlyPathWPs
for (uint8 i = 0; i < 3; ++i)
AddWaypoint(i, FlyPathWPs[i][0]+irand(-10, 10), FlyPathWPs[i][1]+irand(-10, 10), FlyPathWPs[i][2]);
- Start(false, true);
- SetDespawnAtEnd(false);
}
+ go = true;
+ Start(false, true);
+ SetDespawnAtEnd(false);
}
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
index eeef923a219..652e3f007a9 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
@@ -142,6 +142,9 @@ public:
case TYRANDE:
TyrandeWhisperwind = creature->GetGUID();
break;
+ case NPC_CHANNEL_TARGET:
+ WorldtreeChannelTarget = creature->GetGUID();
+ break;
}
InstanceScript::OnCreatureCreate(creature);
@@ -159,6 +162,7 @@ public:
case DATA_JAINAPROUDMOORE: return JainaProudmoore;
case DATA_THRALL: return Thrall;
case DATA_TYRANDEWHISPERWIND: return TyrandeWhisperwind;
+ case DATA_CHANNEL_TARGET: return WorldtreeChannelTarget;
}
return ObjectGuid::Empty;
@@ -312,6 +316,7 @@ public:
ObjectGuid JainaProudmoore;
ObjectGuid Thrall;
ObjectGuid TyrandeWhisperwind;
+ ObjectGuid WorldtreeChannelTarget;
ObjectGuid HordeGate;
ObjectGuid ElfGate;
uint32 Trash;