From 632b55faa5598ea0770b2ffeae8e007a44769d90 Mon Sep 17 00:00:00 2001 From: KJack Date: Wed, 25 Oct 2023 17:53:00 -0400 Subject: [PATCH] fix (Scripts/ICC): Make Valithria starting health dynamic, fix broken channeling spell (#17586) * Make Valithria starting health dynamic based on actual max health * Fix Risen Archmage broken spell channel and combat log spam --- .../IcecrownCitadel/boss_valithria_dreamwalker.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp index 3b73e10ba..2cf62db2b 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp @@ -293,16 +293,12 @@ public: _instance(creature->GetInstanceScript()), _portalCount(RAID_MODE(3, 8, 3, 8)) { me->SetReactState(REACT_PASSIVE); - _spawnHealth = 1; // just in case if not set below - if (CreatureData const* data = sObjectMgr->GetCreatureData(me->GetSpawnId())) - if (data->curhealth) - _spawnHealth = data->curhealth; } void Reset() override { _events.Reset(); - me->SetHealth(_spawnHealth); + me->SetHealth(me->GetMaxHealth() * 0.5f); // starts at 50% health me->LoadCreaturesAddon(true); // immune to percent heals me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_OBS_MOD_HEALTH, true); @@ -440,8 +436,9 @@ public: // does not enter combat if (_instance->GetBossState(DATA_VALITHRIA_DREAMWALKER) == NOT_STARTED) { - if (me->GetHealth() != _spawnHealth) // healing when boss cannot be engaged (lower spire not finished, cheating) doesn't start the fight, prevent winning this way - me->SetHealth(_spawnHealth); + uint32 startingHealth = me->GetMaxHealth() * 0.5f; + if (me->GetHealth() != startingHealth) // healing when boss cannot be engaged (lower spire not finished, cheating) doesn't start the fight, prevent winning this way + me->SetHealth(startingHealth); return; } @@ -484,7 +481,6 @@ public: private: EventMap _events; InstanceScript* _instance; - uint32 _spawnHealth; uint32 const _portalCount; uint32 _missedPortals; bool _under25PercentTalkDone; @@ -756,7 +752,7 @@ public: if (!me->IsInCombat()) if (me->GetSpawnId()) if (!me->GetCurrentSpell(CURRENT_CHANNELED_SPELL)) - me->CastSpell(me, SPELL_CORRUPTION, false); + me->CastSpell(me, SPELL_CORRUPTION, true); if (!UpdateVictim()) return;