fix(Scripts\TempleOfAhnQiraj): Fix Skeram images not spawning if he's… (#12428)
This commit is contained in:
@@ -58,6 +58,7 @@ public:
|
|||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
|
_Reset();
|
||||||
_flag = 0;
|
_flag = 0;
|
||||||
_hpct = 75.0f;
|
_hpct = 75.0f;
|
||||||
me->SetVisible(true);
|
me->SetVisible(true);
|
||||||
@@ -96,9 +97,6 @@ public:
|
|||||||
if (_flag & (1 << 7))
|
if (_flag & (1 << 7))
|
||||||
_flag = 0;
|
_flag = 0;
|
||||||
|
|
||||||
if (Unit* Target = SelectTarget(SelectTargetMethod::Random))
|
|
||||||
creature->AI()->AttackStart(Target);
|
|
||||||
|
|
||||||
float ImageHealthPct;
|
float ImageHealthPct;
|
||||||
|
|
||||||
if (me->GetHealthPct() < 25.0f)
|
if (me->GetHealthPct() < 25.0f)
|
||||||
@@ -110,12 +108,16 @@ public:
|
|||||||
|
|
||||||
creature->SetMaxHealth(me->GetMaxHealth() * ImageHealthPct);
|
creature->SetMaxHealth(me->GetMaxHealth() * ImageHealthPct);
|
||||||
creature->SetHealth(creature->GetMaxHealth() * (me->GetHealthPct() / 100.0f));
|
creature->SetHealth(creature->GetMaxHealth() * (me->GetHealthPct() / 100.0f));
|
||||||
|
BossAI::JustSummoned(creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* /*killer*/) override
|
void JustDied(Unit* /*killer*/) override
|
||||||
{
|
{
|
||||||
if (!me->IsSummon())
|
if (!me->IsSummon())
|
||||||
|
{
|
||||||
|
_JustDied();
|
||||||
Talk(SAY_DEATH);
|
Talk(SAY_DEATH);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
me->RemoveCorpse();
|
me->RemoveCorpse();
|
||||||
}
|
}
|
||||||
@@ -169,7 +171,7 @@ public:
|
|||||||
|
|
||||||
if (!me->IsSummon() && me->GetHealthPct() < _hpct)
|
if (!me->IsSummon() && me->GetHealthPct() < _hpct)
|
||||||
{
|
{
|
||||||
DoCast(me, SPELL_SUMMON_IMAGES);
|
DoCast(me, SPELL_SUMMON_IMAGES, true);
|
||||||
Talk(SAY_SPLIT);
|
Talk(SAY_SPLIT);
|
||||||
_hpct -= 25.0f;
|
_hpct -= 25.0f;
|
||||||
me->SetVisible(false);
|
me->SetVisible(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user