Skip to content

Commit

Permalink
[3034] Implement Yogg-Saron illusions dialogues
Browse files Browse the repository at this point in the history
Please note that this contains a lot of guesswork and it's based mostly on information from wowwiki and some video parts.
However the event is pretty close to what it actually should be.

Conflicts:
	sd2_revision_nr.h
  • Loading branch information
xfurry authored and Undergarun committed Aug 19, 2014
1 parent 5965a07 commit d116af2
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 24 deletions.
88 changes: 73 additions & 15 deletions scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

/* ScriptData
SDName: boss_yogg_saron
SD%Complete: 85%
SDComment: Illusion cinematics NYI.
SD%Complete: 95%
SDComment: Illusion contain a lot of guesswork.
SDCategory: Ulduar
EndScriptData */

Expand Down Expand Up @@ -72,10 +72,11 @@ enum

// stormwind illusion yells
SAY_GARONA_1 = -1603227,
SAY_GARONA_2 = -1603228,
SAY_GARONA_2 = -1603267,
SAY_GARONA_3 = -1603228,
SAY_YOGG_V1_1 = -1603229,
SAY_YOGG_V1_2 = -1603230,
SAY_GARONA_3 = -1603231,
SAY_KING_LLANE = -1603231,
SAY_GARONA_4 = -1603232,
SAY_YOGG_V1_3 = -1603233,

Expand Down Expand Up @@ -205,20 +206,12 @@ enum
// NPC_BRONZE_CONSORT = 33718, // Nozdormu is not part of the event for some reason
NPC_EMERALD_CONSORT = 33719,
NPC_OBSIDIAN_CONSORT = 33720,
NPC_YSERA = 33495,
NPC_NELTHARION = 33523,
NPC_MALYGOS = 33535,
NPC_ALEXSTRASZA = 33536,

// stormwind vision
NPC_SUIT_OF_ARMOR = 33433,
NPC_GARONA = 33436, // cast spell 64063 on 33437
NPC_KING_LLANE = 33437,
SPELL_ASSASSINATE = 64063,

// icecrown citadel vision
NPC_LICH_KING = 33441, // cast spell 63037 on 33442
NPC_IMMOLATED_CHAMPION = 33442,
NPC_DEATHSWORM_ZEALOT = 33567,
SPELL_DEATHGRASP = 63037,

Expand Down Expand Up @@ -266,6 +259,37 @@ static const DialogueEntry aYoggSaronDialog[] =
{0, 0, 0},
};

static const DialogueEntry aYoggIllusionsDialog[] =
{
// stormwind
{NPC_KING_LLANE, 0, 10000},
{SAY_GARONA_1, NPC_GARONA, 2000},
{SAY_GARONA_2, NPC_GARONA, 8000},
{SAY_GARONA_3, NPC_GARONA, 12000},
{SAY_YOGG_V1_1, NPC_YOGGSARON_ILLUSION, 4000},
{SAY_YOGG_V1_2, NPC_YOGGSARON_ILLUSION, 4000},
{SAY_KING_LLANE, NPC_KING_LLANE, 12000},
{SAY_GARONA_4, NPC_GARONA, 2000},
{SPELL_ASSASSINATE, 0, 4000},
{SAY_YOGG_V1_3, NPC_YOGGSARON_ILLUSION, 0},
// chamber
{NPC_NELTHARION, 0, 10000},
{SAY_NELTHARION_1, NPC_NELTHARION, 10000},
{SAY_YSERA, NPC_YSERA, 7000},
{SAY_NELTHARION_2, NPC_NELTHARION, 6000},
{SAY_MALYGOS, NPC_MALYGOS, 9000},
{SAY_YOGG_V2, NPC_YOGGSARON_ILLUSION, 0},
// icecrown
{NPC_LICH_KING, 0, 10000},
{SAY_LICH_KING_1, NPC_LICH_KING, 5000},
{SAY_CHAMPION_1, NPC_IMMOLATED_CHAMPION, 8000},
{SAY_CHAMPION_2, NPC_IMMOLATED_CHAMPION, 8000},
{SAY_LICH_KING_2, NPC_LICH_KING, 7000},
{SAY_YOGG_V3_1, NPC_YOGGSARON_ILLUSION, 5000},
{SAY_YOGG_V3_2, NPC_YOGGSARON_ILLUSION, 0},
{0, 0, 0},
};

static const float afYoggSaronSpawn[4] = {1980.43f, -25.7708f, 324.9724f, 3.141f};
static const uint32 aMadnessTeleportSpells[MAX_ILLUSIONS] = { SPELL_TELEPORT_TO_STORMWIND_ILLUSION, SPELL_TELEPORT_TO_CHAMBER_ILLUSION, SPELL_TELEPORT_TO_ICEECROWN_ILLUSION };
static const uint32 aMadnessChamberDoors[MAX_ILLUSIONS] = { GO_BRAIN_DOOR_STORMWIND, GO_BRAIN_DOOR_CHAMBER, GO_BRAIN_DOOR_ICECROWN };
Expand Down Expand Up @@ -955,11 +979,13 @@ CreatureAI* GetAI_npc_voice_yogg_saron(Creature* pCreature)
## npc_brain_yogg_saron
######*/

struct MANGOS_DLL_DECL npc_brain_yogg_saronAI : public Scripted_NoMovementAI
struct MANGOS_DLL_DECL npc_brain_yogg_saronAI : public Scripted_NoMovementAI, private DialogueHelper
{
npc_brain_yogg_saronAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature)
npc_brain_yogg_saronAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature),
DialogueHelper(aYoggIllusionsDialog)
{
m_pInstance = (instance_ulduar*)pCreature->GetInstanceData();
InitializeDialogueHelper(m_pInstance);
Reset();
}

Expand Down Expand Up @@ -1051,6 +1077,24 @@ struct MANGOS_DLL_DECL npc_brain_yogg_saronAI : public Scripted_NoMovementAI
}
}

void JustDidDialogueStep(int32 iEntry) override
{
if (!m_pInstance)
return;

switch (iEntry)
{
case SPELL_ASSASSINATE:
if (Creature* pGarona = m_pInstance->GetSingleCreatureFromStorage(NPC_GARONA))
pGarona->CastSpell(pGarona, SPELL_ASSASSINATE, true);
break;
case SAY_LICH_KING_1:
if (Creature* pLichKing = m_pInstance->GetSingleCreatureFromStorage(NPC_LICH_KING))
pLichKing->CastSpell(pLichKing, SPELL_DEATHGRASP, false);
break;
}
}

// Wrapper that prepars the illusions
void DoPrepareIllusion(uint8 uiIndex)
{
Expand All @@ -1070,8 +1114,12 @@ struct MANGOS_DLL_DECL npc_brain_yogg_saronAI : public Scripted_NoMovementAI
m_creature->SummonCreature(NPC_SUIT_OF_ARMOR, 1923.342f, 98.01228f, 239.7495f, 4.834f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000);
m_creature->SummonCreature(NPC_SUIT_OF_ARMOR, 1945.442f, 92.17952f, 239.7495f, 4.049f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000);
// the following are guesswork
m_creature->SummonCreature(NPC_GARONA, 1935.398f, 54.0177f, 240.3764f, 2.008f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000);
m_creature->SummonCreature(NPC_GARONA, 1931.348f, 61.0330f, 241.7094f, 2.008f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000);
m_creature->SummonCreature(NPC_KING_LLANE, 1930.465f, 62.6740f, 242.3763f, 5.196f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000);
m_creature->SummonCreature(NPC_YOGGSARON_ILLUSION, 1927.326f, 68.120f, 242.376f, 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000);

// start dialogue
StartNextDialogueText(NPC_KING_LLANE);
break;
// chamber
case 1:
Expand All @@ -1092,6 +1140,10 @@ struct MANGOS_DLL_DECL npc_brain_yogg_saronAI : public Scripted_NoMovementAI
m_creature->SummonCreature(NPC_ALEXSTRASZA, 2091.679f, -25.289f, 242.646f, 6.282f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000);
m_creature->SummonCreature(NPC_YSERA, 2114.504f, -16.118f, 242.646f, 3.91f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000);
m_creature->SummonCreature(NPC_MALYGOS, 2113.388f, -34.381f, 242.646f, 2.26f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000);
m_creature->SummonCreature(NPC_YOGGSARON_ILLUSION, 2104.555f, -25.635f, 242.646f, 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000);

// start dialogue
StartNextDialogueText(NPC_NELTHARION);
break;
// icecrown
case 2:
Expand All @@ -1111,12 +1163,18 @@ struct MANGOS_DLL_DECL npc_brain_yogg_saronAI : public Scripted_NoMovementAI
m_creature->SummonCreature(NPC_LICH_KING, 1908.557f, -152.4427f, 240.0719f, 4.238f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000);
// the following is guesswork
m_creature->SummonCreature(NPC_IMMOLATED_CHAMPION, 1915.371f,-139.9342f,239.9896f, 4.159f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000);
m_creature->SummonCreature(NPC_YOGGSARON_ILLUSION, 1915.371f,-139.9342f,239.9896f, 0.0f, TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 90000);

// start dialogue
StartNextDialogueText(NPC_LICH_KING);
break;
}
}

void UpdateAI(const uint32 uiDiff) override
{
DialogueUpdate(uiDiff);

// remove stun from tentacles after 30 sec
if (m_uiIllusionTimer)
{
Expand Down
10 changes: 10 additions & 0 deletions scripts/northrend/ulduar/ulduar/instance_ulduar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,16 @@ void instance_ulduar::OnCreatureCreate(Creature* pCreature)
case NPC_MIMIRON_HELPER:
case NPC_HODIR_HELPER:
case NPC_FREYA_HELPER:

case NPC_YSERA:
case NPC_NELTHARION:
case NPC_MALYGOS:
case NPC_ALEXSTRASZA:
case NPC_GARONA:
case NPC_KING_LLANE:
case NPC_LICH_KING:
case NPC_IMMOLATED_CHAMPION:
case NPC_YOGGSARON_ILLUSION:
break;

case NPC_ULDUAR_COLOSSUS:
Expand Down
11 changes: 11 additions & 0 deletions scripts/northrend/ulduar/ulduar/ulduar.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,17 @@ enum
NPC_OMINOUS_CLOUD = 33292,
NPC_GUARDIAN_OF_YOGG = 33136,

// Yogg Saron illusions actors
NPC_YSERA = 33495,
NPC_NELTHARION = 33523,
NPC_MALYGOS = 33535,
NPC_ALEXSTRASZA = 33536,
NPC_GARONA = 33436, // cast spell 64063 on 33437
NPC_KING_LLANE = 33437,
NPC_LICH_KING = 33441, // cast spell 63037 on 33442
NPC_IMMOLATED_CHAMPION = 33442,
NPC_YOGGSARON_ILLUSION = 33552,

// Celestial planetarium
NPC_ALGALON = 32871,

Expand Down
2 changes: 1 addition & 1 deletion sd2_revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __SD2_REVISION_NR_H__
#define __SD2_REVISION_NR_H__
#define SD2_REVISION_NR "3032"
#define SD2_REVISION_NR "3034"
#endif // __SD2_REVISION_NR_H__
17 changes: 9 additions & 8 deletions sql/scriptdev2_script_full.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3844,17 +3844,17 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen
(-1603220,'Yrr n\'lyeth... shuul anagg!',15766,0,0,0,'yogg SAY_YOGG_V3_1'),
(-1603221,'He will learn... no king rules forever; only death is eternal!',15767,0,0,0,'yogg SAY_YOGG_V3_2'),

(-1603222,'It is done... All have been given that which must be given. I now seal the Dragon Soul forever...',15631,0,0,0,'yogg SAY_NELTHARION_1'),
(-1603223,'That terrible glow... should that be?',15784,0,0,0,'yogg SAY_YSERA'),
(-1603224,'For it to be as it must, yes.',15632,0,0,0,'yogg SAY_NELTHARION_2'),
(-1603225,'It is a weapon like no other. It must be like no other.',15610,0,0,0,'yogg SAY_MALYGOS'),
(-1603222,'It is done... All have been given that which must be given. I now seal the Dragon Soul forever...',15631,0,0,1,'yogg SAY_NELTHARION_1'),
(-1603223,'That terrible glow... should that be?',15784,0,0,1,'yogg SAY_YSERA'),
(-1603224,'For it to be as it must, yes.',15632,0,0,1,'yogg SAY_NELTHARION_2'),
(-1603225,'It is a weapon like no other. It must be like no other.',15610,0,0,1,'yogg SAY_MALYGOS'),
(-1603226,'His brood learned their lesson before too long, you shall soon learn yours!',15765,0,0,0,'yogg SAY_YOGG_V2'),

(-1603227,'Bad news sire. The clans are united under Blackhand in this assault. They will stand together until Stormwind has fallen.',15538,0,0,0,'yogg SAY_GARONA_1'),
(-1603228,'Gul\'dan is bringing up his warlocks by nightfall. Until then, the Blackrock clan will be trying to take the Eastern Wall.',15539,0,0,0,'yogg SAY_GARONA_2'),
(-1603227,'Bad news sire.',15538,0,0,1,'yogg SAY_GARONA_1'),
(-1603228,'Gul\'dan is bringing up his warlocks by nightfall. Until then, the Blackrock clan will be trying to take the Eastern Wall.',15540,0,0,1,'yogg SAY_GARONA_3'),
(-1603229,'A thousand deaths... ',15762,0,0,0,'yogg SAY_YOGG_V1_1'),
(-1603230,'or one murder.',15763,0,0,0,'yogg SAY_YOGG_V1_2'),
(-1603231,'We will hold until the reinforcements come. As long as men with stout hearts are manning the walls and throne Stormwind will hold.',15540,0,0,0,'yogg SAY_GARONA_3'),
(-1603231,'We will hold until the reinforcements come. As long as men with stout hearts are manning the walls and throne Stormwind will hold.',15585,0,0,1,'yogg SAY_KING_LLANE'),
(-1603232,'The orc leaders agree with your assessment.',15541,0,0,0,'yogg SAY_GARONA_4'),
(-1603233,'Your petty quarrels only make me stronger!',15764,0,0,0,'yogg SAY_YOGG_V1_3'),

Expand Down Expand Up @@ -3897,7 +3897,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen
(-1603263,'The fiend of a thousand faces.',0,1,0,457,'yogg SAY_PHASE_2_INTRO_3'),
(-1603264,'Cower before my true form.',0,1,0,457,'yogg SAY_PHASE_2_INTRO_4'),
(-1603265,'BOW DOWN BEFORE THE GOD OF DEATH!',0,1,0,0,'yogg SAY_PHASE_2_INTRO_5'),
(-1603266,'%s opens his mouth wide!',0,3,0,0,'yogg EMOTE_DEAFENING_ROAR');
(-1603266,'%s opens his mouth wide!',0,3,0,0,'yogg EMOTE_DEAFENING_ROAR'),
(-1603267,'The clans are united under Blackhand in this assault. They will stand together until Stormwind has fallen.',15539,0,0,1,'yogg SAY_GARONA_2');

-- -1 604 000 GUNDRAK
INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES
Expand Down
7 changes: 7 additions & 0 deletions sql/updates/r3034_scriptdev2.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
DELETE FROM script_texts WHERE entry IN (-1603227,-1603228,-1603231,-1603267);
INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES
(-1603227,'Bad news sire.',15538,0,0,1,'yogg SAY_GARONA_1'),
(-1603228,'Gul\'dan is bringing up his warlocks by nightfall. Until then, the Blackrock clan will be trying to take the Eastern Wall.',15540,0,0,1,'yogg SAY_GARONA_3'),
(-1603231,'We will hold until the reinforcements come. As long as men with stout hearts are manning the walls and throne Stormwind will hold.',15585,0,0,1,'yogg SAY_KING_LLANE'),
(-1603267,'The clans are united under Blackhand in this assault. They will stand together until Stormwind has fallen.',15539,0,0,0,'yogg SAY_GARONA_2');
UPDATE script_texts SET emote=1 WHERE entry IN (-1603222,-1603223,-1603224,-1603225);

0 comments on commit d116af2

Please sign in to comment.