diff --git a/sql/scriptdev2/scriptdev2.sql b/sql/scriptdev2/scriptdev2.sql index cc00411404c..30eaa783d51 100644 --- a/sql/scriptdev2/scriptdev2.sql +++ b/sql/scriptdev2/scriptdev2.sql @@ -3992,16 +3992,6 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,broadc -- -1 548 000 SERPENTSHRINE CAVERN INSERT INTO script_texts (entry,content_default,sound,type,language,emote,broadcast_text_id,comment) VALUES -('-1548000','I cannot allow you to interfere!','11289','1','0','0','20231','hydross SAY_AGGRO'), -('-1548001','Better, much better.','11290','1','0','0','19607','hydross SAY_SWITCH_TO_CLEAN'), -('-1548002','They have forced me to this....','11291','1','0','0','20235','hydross SAY_CLEAN_SLAY1'), -('-1548003','I had no choice.','11292','1','0','0','20236','hydross SAY_CLEAN_SLAY2'), -('-1548004','I am... released.','11293','1','0','0','20238','hydross SAY_CLEAN_DEATH'), -('-1548005','Aaghh, the poison...','11297','1','0','0','19606','hydross SAY_SWITCH_TO_CORRUPT'), -('-1548006','I will purge you from this place!','11298','1','0','0','20233','hydross SAY_CORRUPT_SLAY1'), -('-1548007','You are no better than they!','11299','1','0','0','20234','hydross SAY_CORRUPT_SLAY2'), -('-1548008','You... are the disease... not I...','11300','1','0','0','20239','hydross SAY_CORRUPT_DEATH'), - ('-1548009','Finally, my banishment ends!','11312','1','0','0','19596','leotheras SAY_AGGRO'), ('-1548010','Be gone, trifling elf. I am in control now!','11304','1','0','0','19595','leotheras SAY_SWITCH_TO_DEMON'), ('-1548011','We all have our demons....','11305','1','0','0','19597','leotheras SAY_INNER_DEMONS'), diff --git a/src/game/AI/ScriptDevAI/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp b/src/game/AI/ScriptDevAI/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp index 44d4b7ce871..0b68422b2c2 100644 --- a/src/game/AI/ScriptDevAI/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp +++ b/src/game/AI/ScriptDevAI/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp @@ -29,22 +29,22 @@ EndScriptData */ enum { - SAY_AGGRO = -1548000, - SAY_SWITCH_TO_CLEAN = -1548001, - SAY_CLEAN_SLAY1 = -1548002, - SAY_CLEAN_SLAY2 = -1548003, - SAY_CLEAN_DEATH = -1548004, - SAY_SWITCH_TO_CORRUPT = -1548005, - SAY_CORRUPT_SLAY1 = -1548006, - SAY_CORRUPT_SLAY2 = -1548007, - SAY_CORRUPT_DEATH = -1548008, + SAY_AGGRO = 20231, + SAY_SWITCH_TO_CLEAN = 19607, + SAY_CLEAN_SLAY1 = 20235, + SAY_CLEAN_SLAY2 = 20236, + SAY_CLEAN_DEATH = 20238, + SAY_SWITCH_TO_CORRUPT = 19606, + SAY_CORRUPT_SLAY1 = 20233, + SAY_CORRUPT_SLAY2 = 20234, + SAY_CORRUPT_DEATH = 20239, SPELL_WATER_TOMB = 38235, SPELL_VILE_SLUDGE = 38246, SPELL_CORRUPTION_SD = 37961, // transform spell SPELL_BERSERK = 27680, // ToDo: this spell need verification SPELL_BLUE_BEAM = 38015, - SPELL_SUMMON_WATER_ELEMENT = 36459, // spawn elemental on OOC timer + SPELL_SUMMON_WATER_ELEMENTAL = 36459, // spawn elemental on OOC timer SPELL_ELEMENTAL_SPAWNIN = 25035, SPELL_PURIFY_ELEMENTAL = 36461, // purify elemental on OOC timer SPELL_CLEANSING_FIELD = 37935, // TODO: Implement phase transition using this @@ -85,8 +85,6 @@ struct boss_hydross_the_unstableAI : public CombatAI uint32 m_uiPosCheckTimer; uint32 m_uiMarkTimer; - uint32 m_uiWaterTombTimer; - uint32 m_uiVileSludgeTimer; uint32 m_uiEnrageTimer; uint8 m_uiMarkCount; bool m_corruptedForm; @@ -96,8 +94,6 @@ struct boss_hydross_the_unstableAI : public CombatAI CombatAI::Reset(); m_uiPosCheckTimer = 1000; m_uiMarkTimer = 15000; - m_uiWaterTombTimer = 7000; - m_uiVileSludgeTimer = 7000; m_uiMarkCount = 0; m_uiEnrageTimer = 10 * MINUTE * IN_MILLISECONDS; @@ -110,7 +106,7 @@ struct boss_hydross_the_unstableAI : public CombatAI void Aggro(Unit* /*who*/) override { - DoScriptText(SAY_AGGRO, m_creature); + DoBroadcastText(SAY_AGGRO, m_creature); if (m_instance) m_instance->SetData(TYPE_HYDROSS_EVENT, IN_PROGRESS); @@ -119,14 +115,14 @@ struct boss_hydross_the_unstableAI : public CombatAI void KilledUnit(Unit* /*victim*/) override { if (m_corruptedForm) - DoScriptText(urand(0, 1) ? SAY_CORRUPT_SLAY1 : SAY_CORRUPT_SLAY2, m_creature); + DoBroadcastText(urand(0, 1) ? SAY_CORRUPT_SLAY1 : SAY_CORRUPT_SLAY2, m_creature); else - DoScriptText(urand(0, 1) ? SAY_CLEAN_SLAY1 : SAY_CLEAN_SLAY2, m_creature); + DoBroadcastText(urand(0, 1) ? SAY_CLEAN_SLAY1 : SAY_CLEAN_SLAY2, m_creature); } void JustDied(Unit* /*killer*/) override { - DoScriptText(m_corruptedForm ? SAY_CORRUPT_DEATH : SAY_CLEAN_DEATH, m_creature); + DoBroadcastText(m_corruptedForm ? SAY_CORRUPT_DEATH : SAY_CLEAN_DEATH, m_creature); if (m_instance) m_instance->SetData(TYPE_HYDROSS_EVENT, DONE); @@ -181,13 +177,13 @@ struct boss_hydross_the_unstableAI : public CombatAI void HandleSummonElemental() { - DoCastSpellIfCan(m_creature, SPELL_SUMMON_WATER_ELEMENT); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_WATER_ELEMENTAL); ResetTimer(HYDROSS_SPAWN_ELEMENTAL, 20000); } void HandleSwitchToClean() { - DoScriptText(SAY_SWITCH_TO_CLEAN, m_creature); + DoBroadcastText(SAY_SWITCH_TO_CLEAN, m_creature); m_creature->RemoveAurasDueToSpell(SPELL_CORRUPTION_SD); m_uiMarkCount = 0; @@ -201,13 +197,19 @@ struct boss_hydross_the_unstableAI : public CombatAI m_corruptedForm = false; m_uiMarkTimer = 15000; + + for (uint32 spellId : aMarkHydross) + { + SpellEntry const* spellInfo = sSpellTemplate.LookupEntry(spellId); + m_creature->RemoveSpellCooldown(*spellInfo, false); + } } void HandleSwitchToCorruption() { if (DoCastSpellIfCan(nullptr, SPELL_CORRUPTION_SD) == CAST_OK) { - DoScriptText(SAY_SWITCH_TO_CORRUPT, m_creature); + DoBroadcastText(SAY_SWITCH_TO_CORRUPT, m_creature); m_uiMarkCount = 0; HandleBeamHelpers(true); @@ -220,6 +222,12 @@ struct boss_hydross_the_unstableAI : public CombatAI m_corruptedForm = true; m_uiMarkTimer = 15000; + + for (uint32 spellId : aMarkCorruption) + { + SpellEntry const* spellInfo = sSpellTemplate.LookupEntry(spellId); + m_creature->RemoveSpellCooldown(*spellInfo, false); + } } } @@ -231,17 +239,6 @@ struct boss_hydross_the_unstableAI : public CombatAI // corrupted form if (m_corruptedForm) { - if (m_uiVileSludgeTimer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, nullptr, SELECT_FLAG_PLAYER)) - { - if (DoCastSpellIfCan(pTarget, SPELL_VILE_SLUDGE) == CAST_OK) - m_uiVileSludgeTimer = 15000; - } - } - else - m_uiVileSludgeTimer -= uiDiff; - // Change to clean if (m_uiPosCheckTimer < uiDiff) { @@ -258,17 +255,6 @@ struct boss_hydross_the_unstableAI : public CombatAI // clean form else { - if (m_uiWaterTombTimer < uiDiff) - { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, nullptr, SELECT_FLAG_PLAYER)) - { - if (DoCastSpellIfCan(pTarget, SPELL_WATER_TOMB) == CAST_OK) - m_uiWaterTombTimer = 7000; - } - } - else - m_uiWaterTombTimer -= uiDiff; - // Change to corrupt if (m_uiPosCheckTimer < uiDiff) { @@ -299,17 +285,6 @@ struct boss_hydross_the_unstableAI : public CombatAI else m_uiMarkTimer -= uiDiff; - if (m_uiEnrageTimer) - { - if (m_uiEnrageTimer <= uiDiff) - { - if (DoCastSpellIfCan(nullptr, SPELL_BERSERK) == CAST_OK) - m_uiEnrageTimer = 0; - } - else - m_uiEnrageTimer -= uiDiff; - } - DoMeleeAttackIfReady(); } };