From 4105d370bf71d02dde277ce71387b4378649ceca Mon Sep 17 00:00:00 2001 From: Silker <61223313+Si1ker@users.noreply.github.com> Date: Sun, 22 Nov 2020 11:16:35 -0600 Subject: [PATCH] fix(DB/scripts): Freya - Sun beam (#3730) --- .../pending_db_world/rev_1605911267657207700.sql | 10 ++++++++++ .../scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp | 12 +++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1605911267657207700.sql diff --git a/data/sql/updates/pending_db_world/rev_1605911267657207700.sql b/data/sql/updates/pending_db_world/rev_1605911267657207700.sql new file mode 100644 index 000000000..872960161 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1605911267657207700.sql @@ -0,0 +1,10 @@ +INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1605911267657207700'); + +/* + * Update by Silker | | Copyright (C) +*/ + +-- fix models +UPDATE `creature_template` SET `modelid1`=23258, `modelid2`=0 WHERE `entry` IN +(33395, 33402) + diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp index 17094e105..3e799f789 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp @@ -370,6 +370,11 @@ public: void JustSummoned(Creature* cr) { + if (cr->GetEntry() == NPC_FREYA_UNSTABLE_SUN_BEAM) + { + cr->CastSpell(cr, SPELL_UNSTABLE_SUN_VISUAL, true); + cr->CastSpell(cr, SPELL_UNSTABLE_SUN_FREYA_DAMAGE, true); + } summons.Summon(cr); } @@ -636,10 +641,11 @@ public: events.RepeatEvent(45000 + urand(0, 10000)); break; case EVENT_FREYA_UNSTABLE_SUN_BEAM: - if (Creature* cr = me->SummonCreature(NPC_FREYA_UNSTABLE_SUN_BEAM, me->GetPositionX() + urand(7, 25), me->GetPositionY() + urand(7, 25), me->GetMap()->GetHeight(me->GetPositionX(), me->GetPositionY(), MAX_HEIGHT), 0, TEMPSUMMON_TIMED_DESPAWN, 10000)) + me->SummonCreature(NPC_FREYA_UNSTABLE_SUN_BEAM, me->GetPositionX() + urand(7, 25), me->GetPositionY() + urand(7, 25), me->GetMap()->GetHeight(me->GetPositionX(), me->GetPositionY(), MAX_HEIGHT), 0, TEMPSUMMON_TIMED_DESPAWN, 10000); + if (Is25ManRaid()) { - cr->CastSpell(cr, SPELL_UNSTABLE_SUN_VISUAL, true); - cr->CastSpell(cr, SPELL_UNSTABLE_SUN_FREYA_DAMAGE, true); + me->SummonCreature(NPC_FREYA_UNSTABLE_SUN_BEAM, me->GetPositionX() + urand(7, 25), me->GetPositionY() + urand(7, 25), me->GetMap()->GetHeight(me->GetPositionX(), me->GetPositionY(), MAX_HEIGHT), 0, TEMPSUMMON_TIMED_DESPAWN, 10000); + me->SummonCreature(NPC_FREYA_UNSTABLE_SUN_BEAM, me->GetPositionX() + urand(7, 25), me->GetPositionY() + urand(7, 25), me->GetMap()->GetHeight(me->GetPositionX(), me->GetPositionY(), MAX_HEIGHT), 0, TEMPSUMMON_TIMED_DESPAWN, 10000); } events.RepeatEvent(38000 + urand(0, 10000)); break;