mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
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:
@@ -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');
|
||||
@@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user