Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core/Scripts Yogg-Saron Portals #16708

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions sql/updates/world/2016_03_01_99_world.sql
@@ -0,0 +1,4 @@
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=18 AND `SourceEntry` IN (63989,63997,63998);
DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=34072;
INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES
(34072, 51347, 3, 0);
13 changes: 13 additions & 0 deletions src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp
Expand Up @@ -230,6 +230,9 @@ enum Spells

// Descend Into Madness
SPELL_TELEPORT_PORTAL_VISUAL = 64416,
SPELL_TELEPORT_TO_STORMWIND_ILLUSION = 63989,
SPELL_TELEPORT_TO_CHAMBER_ILLUSION = 63997,
SPELL_TELEPORT_TO_ICECROWN_ILLUSION = 63998,

// Illusions
SPELL_GRIM_REPRISAL = 63305,
Expand Down Expand Up @@ -395,6 +398,14 @@ enum MiscData
{
ACHIEV_TIMED_START_EVENT = 21001,
SOUND_LUNATIC_GAZE = 15757,
MAX_ILLUSION_ROOMS = 3
};

uint32 const IllusionSpells[MAX_ILLUSION_ROOMS]
{
SPELL_TELEPORT_TO_CHAMBER_ILLUSION,
SPELL_TELEPORT_TO_ICECROWN_ILLUSION,
SPELL_TELEPORT_TO_STORMWIND_ILLUSION
};

class StartAttackEvent : public BasicEvent
Expand Down Expand Up @@ -1419,7 +1430,9 @@ class npc_descend_into_madness : public CreatureScript
{
if (!result)
return;

clicker->RemoveAurasDueToSpell(SPELL_BRAIN_LINK);
DoCast(clicker, IllusionSpells[_instance->GetData(DATA_ILLUSION)], true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible that GetData(DATA_ILLUSION) returns a value not 0..2?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afaik only if you use SetData do change it, other places where this GetData is used does not perform any check too, and even if return a weird value(which should not happen), DoCast already checks if the spell passed is valid.

me->DespawnOrUnsummon();
}

Expand Down