Skip to content

Commit

Permalink
More WIP
Browse files Browse the repository at this point in the history
UPDATE broadcast_text SET ChatTypeID=1,SoundEntriesID1=11289,EmoteId1=0 WHERE Id IN(20231);
UPDATE broadcast_text SET ChatTypeID=1,SoundEntriesID1=11290,EmoteId1=0 WHERE Id IN(19607);
UPDATE broadcast_text SET ChatTypeID=1,SoundEntriesID1=11291,EmoteId1=0 WHERE Id IN(20235);
UPDATE broadcast_text SET ChatTypeID=1,SoundEntriesID1=11292,EmoteId1=0 WHERE Id IN(20236);
UPDATE broadcast_text SET ChatTypeID=1,SoundEntriesID1=11293,EmoteId1=0 WHERE Id IN(20238);
UPDATE broadcast_text SET ChatTypeID=1,SoundEntriesID1=11297,EmoteId1=0 WHERE Id IN(19606);
UPDATE broadcast_text SET ChatTypeID=1,SoundEntriesID1=11298,EmoteId1=0 WHERE Id IN(20233);
UPDATE broadcast_text SET ChatTypeID=1,SoundEntriesID1=11299,EmoteId1=0 WHERE Id IN(20234);
UPDATE broadcast_text SET ChatTypeID=1,SoundEntriesID1=11300,EmoteId1=0 WHERE Id IN(20239);

UPDATE creature_template SET SpellList = 2121601 WHERE entry=21216;
DELETE FROM creature_spell_list_entry WHERE Id IN(2121601,2121602);
INSERT INTO creature_spell_list_entry(Id, Name, ChanceSupportAction, ChanceRangedAttack) VALUES
(2121601, 'Serpentshrine Cavern - Hydross the Unstable - Clean', 0, 0),
(2121602, 'Serpentshrine Cavern - Hydross the Unstable - Corrupt', 0, 0),
(2121603, 'Serpentshrine Cavern - Hydross the Unstable - Clean - Repeat', 0, 0);
DELETE FROM creature_spell_list WHERE Id IN(2121601,2121602);
INSERT INTO creature_spell_list(Id, Position, SpellId, Flags, CombatCondition, TargetId, ScriptId, Availability, Probability, InitialMin, InitialMax, RepeatMin, RepeatMax, Comments) VALUES
('2121601', '0', '38235', '0', '-1', '101', '0', '100', '1','7000','7000','7000','7000', 'Hydross the Unstable - Water Tomb on random player non tank'),
('2121601', '1', '27680', '0', '-1', '0', '0', '100', '1','600000','600000','600000','600000', 'Hydross the Unstable - Berserk'),
('2121601', '2', '38215', '0', '-1', '0', '0', '100', '1','15000','15000','1200000','1200000', 'Hydross the Unstable - Mark of Hydross'),
('2121601', '3', '38216', '0', '-1', '0', '0', '100', '1','30000','30000','1200000','1200000', 'Hydross the Unstable - Mark of Hydross'),
('2121601', '4', '38217', '0', '-1', '0', '0', '100', '1','45000','45000','1200000','1200000', 'Hydross the Unstable - Mark of Hydross'),
('2121601', '5', '38218', '0', '-1', '0', '0', '100', '1','60000','60000','1200000','1200000', 'Hydross the Unstable - Mark of Hydross'),
('2121601', '6', '38231', '0', '-1', '0', '0', '100', '1','75000','75000','1200000','1200000', 'Hydross the Unstable - Mark of Hydross'),
('2121601', '7', '40584', '0', '-1', '0', '0', '100', '1','90000','90000','15000','15000', 'Hydross the Unstable - Mark of Hydross');
INSERT INTO creature_spell_list(Id, Position, SpellId, Flags, CombatCondition, TargetId, ScriptId, Availability, Probability, InitialMin, InitialMax, RepeatMin, RepeatMax, Comments) VALUES
('2121602', '0', '38246', '0', '-1', '100', '0', '100', '1','7000','7000','15000','15000', 'Hydross the Unstable - Vile Sludge - on random player'),
('2121602', '1', '27680', '0', '-1', '0', '0', '100', '1','0','0','600000','600000', 'Hydross the Unstable - Berserk'),
('2121602', '2', '38219', '0', '-1', '0', '0', '100', '1','15000','15000','1200000','1200000', 'Hydross the Unstable - Mark of Corruption'),
('2121602', '3', '38220', '0', '-1', '0', '0', '100', '1','30000','30000','1200000','1200000', 'Hydross the Unstable - Mark of Corruption'),
('2121602', '4', '38221', '0', '-1', '0', '0', '100', '1','45000','45000','1200000','1200000', 'Hydross the Unstable - Mark of Corruption'),
('2121602', '5', '38222', '0', '-1', '0', '0', '100', '1','60000','60000','1200000','1200000', 'Hydross the Unstable - Mark of Corruption'),
('2121602', '6', '38230', '0', '-1', '0', '0', '100', '1','75000','75000','1200000','1200000', 'Hydross the Unstable - Mark of Corruption'),
('2121602', '7', '40583', '0', '-1', '0', '0', '100', '1','90000','90000','15000','15000', 'Hydross the Unstable - Mark of Corruption');
INSERT INTO creature_spell_list(Id, Position, SpellId, Flags, CombatCondition, TargetId, ScriptId, Availability, Probability, InitialMin, InitialMax, RepeatMin, RepeatMax, Comments) VALUES
('2121603', '0', '38235', '0', '-1', '101', '0', '100', '1','7000','7000','7000','7000', 'Hydross the Unstable - Water Tomb on random player non tank'),
('2121603', '1', '27680', '0', '-1', '0', '0', '100', '1','0','0','600000','600000', 'Hydross the Unstable - Berserk'),
('2121603', '2', '38215', '0', '-1', '0', '0', '100', '1','15000','15000','1200000','1200000', 'Hydross the Unstable - Mark of Hydross'),
('2121603', '3', '38216', '0', '-1', '0', '0', '100', '1','30000','30000','1200000','1200000', 'Hydross the Unstable - Mark of Hydross'),
('2121603', '4', '38217', '0', '-1', '0', '0', '100', '1','45000','45000','1200000','1200000', 'Hydross the Unstable - Mark of Hydross'),
('2121603', '5', '38218', '0', '-1', '0', '0', '100', '1','60000','60000','1200000','1200000', 'Hydross the Unstable - Mark of Hydross'),
('2121603', '6', '38231', '0', '-1', '0', '0', '100', '1','75000','75000','1200000','1200000', 'Hydross the Unstable - Mark of Hydross'),
('2121603', '7', '40584', '0', '-1', '0', '0', '100', '1','90000','90000','15000','15000', 'Hydross the Unstable - Mark of Hydross');
  • Loading branch information
killerwife committed Oct 2, 2023
1 parent 4e9e2fc commit 27d4d87
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 64 deletions.
10 changes: 0 additions & 10 deletions sql/scriptdev2/scriptdev2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand All @@ -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;

Expand All @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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;

Expand All @@ -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<SpellEntry>(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);
Expand All @@ -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<SpellEntry>(spellId);
m_creature->RemoveSpellCooldown(*spellInfo, false);
}
}
}

Expand All @@ -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)
{
Expand All @@ -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)
{
Expand Down Expand Up @@ -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();
}
};
Expand Down

0 comments on commit 27d4d87

Please sign in to comment.