fix(Scripts/SSC): Leotheras demon form fixes (#17953)

* initial

* add 15% hp to p3 demon

* increase chase range

* correct behaviour

* remover leftover and make target non-static

* whitespace
This commit is contained in:
Dan
2023-12-08 00:10:33 +01:00
committed by GitHub
parent 5e02648d70
commit 3ac77eb379
2 changed files with 25 additions and 2 deletions

View File

@@ -0,0 +1,6 @@
--
DELETE FROM `smart_scripts` WHERE `entryorguid` = 21875 AND `source_type` = 0;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(21875, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 142, 15, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadow of Leotheras - Just Summoned - Set health 15%'),
(21875, 0, 1, 0, 0, 0, 100, 0, 0, 1000, 2000, 2000, 0, 0, 11, 37674, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadow of Leotheras - In Combat - Cast Chaos Blast'),
(21875, 0, 2, 0, 60, 0, 100, 1, 8000, 8000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadow of Leotheras - On Update - Talk');

View File

@@ -167,17 +167,33 @@ struct boss_leotheras_the_blind : public BossAI
});
}
void MoveToTargetIfOutOfRange(Unit* target)
{
if (me->GetDistance2d(target) > 40.0f)
{
me->GetMotionMaster()->MoveChase(target, 5.0f, 0);
me->AddThreat(target, 0.0f);
}
else
{
me->GetMotionMaster()->Clear();
}
}
void DemonTime()
{
DoResetThreatList();
me->RemoveAurasDueToSpell(SPELL_WHIRLWIND);
me->InterruptNonMeleeSpells(false);
me->LoadEquipment(0, true);
me->GetMotionMaster()->MoveChase(me->GetVictim(), 25.0f);
DoCastSelf(SPELL_METAMORPHOSIS, true);
scheduler.CancelGroup(GROUP_COMBAT);
scheduler.Schedule(24250ms, GROUP_DEMON, [this](TaskContext)
scheduler.Schedule(1s, GROUP_DEMON, [this](TaskContext context)
{
MoveToTargetIfOutOfRange(me->GetVictim());
context.Repeat(1s);
}).Schedule(24250ms, GROUP_DEMON, [this](TaskContext)
{
Talk(SAY_INNER_DEMONS);
me->CastCustomSpell(SPELL_INSIDIOUS_WHISPER, SPELLVALUE_MAX_TARGETS, 5, me, false);
@@ -187,6 +203,7 @@ struct boss_leotheras_the_blind : public BossAI
me->LoadEquipment();
me->GetMotionMaster()->MoveChase(me->GetVictim(), 0.0f);
me->RemoveAurasDueToSpell(SPELL_METAMORPHOSIS);
scheduler.CancelGroup(GROUP_DEMON);
ElfTime();
});
}