From 1ee058dfd817d0f65d738cc6ed5b1382e9a0a593 Mon Sep 17 00:00:00 2001 From: Nefertumm Date: Mon, 11 Apr 2022 08:15:15 -0300 Subject: [PATCH] fix(Core/BWL): Nefarian spawns (#11326) * fix(Core/BWL): Nefarian spawns * Rogue class call with vanish * backticks * despawn skeletons after death * Update boss_nefarian.cpp --- .../updates/pending_db_world/rev_1649370784577886400.sql | 7 +++++++ src/server/game/Spells/SpellInfoCorrections.cpp | 8 -------- .../BlackrockMountain/BlackwingLair/boss_nefarian.cpp | 5 +++-- .../BlackwingLair/instance_blackwing_lair.cpp | 1 + 4 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1649370784577886400.sql diff --git a/data/sql/updates/pending_db_world/rev_1649370784577886400.sql b/data/sql/updates/pending_db_world/rev_1649370784577886400.sql new file mode 100644 index 000000000..e56974dd4 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1649370784577886400.sql @@ -0,0 +1,7 @@ +INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1649370784577886400'); + +DELETE FROM `spell_linked_spell` WHERE `spell_trigger` = 23414 AND `spell_effect` IN (-1856, -1857, -26889); +INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES +(23414, -1856, 2, 'Nefarian Rogue class call - Vanish'), +(23414, -1857, 2, 'Nefarian Rogue class call - Vanish'), +(23414, -26889, 2, 'Nefarian Rogue class call - Vanish'); diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp index 5ee82985b..45c72f484 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -4160,14 +4160,6 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->RangeEntry = sSpellRangeStore.LookupEntry(152); // 150 yards }); - // Shadowbolt Volley - ApplySpellFix({ 22665 }, [](SpellInfo* spellInfo) - { - spellInfo->RangeEntry = sSpellRangeStore.LookupEntry(152); // 150 yards - spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(41); // 150 yards - spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT; - }); - ApplySpellFix({ 22247 }, [](SpellInfo* spellInfo) { spellInfo->AttributesCu |= SPELL_ATTR0_CU_DONT_BREAK_STEALTH; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp index bee157c66..ab2d4dd6d 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp @@ -256,7 +256,7 @@ public: me->SetVisible(true); me->SetPhaseMask(1, true); - me->ReplaceAllNpcFlags(NPCFlags(1)); + me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP); me->SetFaction(FACTION_FRIENDLY); me->SetStandState(UNIT_STAND_STATE_SIT_HIGH_CHAIR); me->RemoveAura(SPELL_NEFARIANS_BARRIER); @@ -284,6 +284,7 @@ public: if (action == ACTION_KILLED) { + summons.DespawnEntry(NPC_BONE_CONSTRUCT); Unit::Kill(me, me); } } @@ -472,7 +473,7 @@ public: Talk(SAY_GAMESBEGIN_1); events.ScheduleEvent(EVENT_START_EVENT, 4000); me->SetFaction(FACTION_DRAGONFLIGHT_BLACK); - me->ReplaceAllNpcFlags(UNIT_NPC_FLAG_NONE); + me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP); me->SetStandState(UNIT_STAND_STATE_STAND); me->SetUnitFlag(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE); // Due to Nefarius despawning himself on Vael, we need to update the guid on instance to prevent unwanted behaviours as encounter not resetting at all. diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp index b39974a38..9730ab407 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp @@ -400,6 +400,7 @@ public: summon->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); summon->SetReactState(REACT_PASSIVE); summon->SetStandState(UNIT_STAND_STATE_DEAD); + summon->SetHomePosition(summon->GetPosition()); if (Creature* nefarius = instance->GetCreature(victorNefariusGUID)) {