fix(Scripts/ScarletMonastery): Prevent Whitemane from dying before resurrecting Mograine (#18082)

The current code only prevents Whitemane from dying before casting sleep, but the players can inflict enough DPS on her before that, that she can die before resurrecting Mograine.
When this happens, the dungeon is broken and cannot progress.
This commit is contained in:
Alexandru-Mihai Maftei
2023-12-30 15:47:02 +00:00
committed by GitHub
parent 6a6cefb512
commit ebe89b875f

View File

@@ -538,7 +538,7 @@ public:
void DamageTaken(Unit* /*doneBy*/, uint32& damage, DamageEffectType, SpellSchoolMask) override
{
if (!canResurrectCheck && damage >= me->GetHealth())
if ((!canResurrectCheck || canResurrect) && damage >= me->GetHealth())
damage = me->GetHealth() - 1;
}