fix(Scripts/Ulduar): summon Freya's Lifebinder's Gift through its spell chain (#27062)

This commit is contained in:
Andrew
2026-08-09 11:19:35 -03:00
committed by GitHub
parent 037b45e3a3
commit aca38f52f1
2 changed files with 50 additions and 34 deletions
@@ -0,0 +1,30 @@
--
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 13 AND `SourceEntry` IN (62584, 64185, 63947);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(13, 3, 62584, 0, 0, 31, 0, 3, 32906, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift - Force cast and heal only Freya'),
(13, 3, 64185, 0, 0, 31, 0, 3, 32906, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift - Force cast and heal only Freya'),
(13, 4, 62584, 0, 0, 31, 0, 3, 32916, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift - Heal Snaplasher'),
(13, 4, 62584, 0, 1, 31, 0, 3, 32918, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift - Heal Detonating Lasher'),
(13, 4, 62584, 0, 2, 31, 0, 3, 32919, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift - Heal Storm Lasher'),
(13, 4, 62584, 0, 3, 31, 0, 3, 33050, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift - Heal Unstable Sun Beam'),
(13, 4, 62584, 0, 4, 31, 0, 3, 33088, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift - Heal Iron Roots'),
(13, 4, 62584, 0, 5, 31, 0, 3, 33168, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift - Heal Strengthened Iron Roots'),
(13, 4, 62584, 0, 6, 31, 0, 3, 33170, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift - Heal Sun Beam'),
(13, 4, 62584, 0, 7, 31, 0, 3, 33202, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift - Heal Ancient Water Spirit'),
(13, 4, 62584, 0, 8, 31, 0, 3, 33203, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift - Heal Ancient Conservator'),
(13, 4, 62584, 0, 9, 31, 0, 3, 33215, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift - Heal Healthy Spore'),
(13, 4, 62584, 0, 10, 31, 0, 3, 33228, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift - Heal Eonar''s Gift'),
(13, 4, 62584, 0, 11, 31, 0, 3, 34129, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift - Heal Nature Bomb'),
(13, 4, 64185, 0, 0, 31, 0, 3, 32916, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift - Heal Snaplasher'),
(13, 4, 64185, 0, 1, 31, 0, 3, 32918, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift - Heal Detonating Lasher'),
(13, 4, 64185, 0, 2, 31, 0, 3, 32919, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift - Heal Storm Lasher'),
(13, 4, 64185, 0, 3, 31, 0, 3, 33050, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift - Heal Unstable Sun Beam'),
(13, 4, 64185, 0, 4, 31, 0, 3, 33088, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift - Heal Iron Roots'),
(13, 4, 64185, 0, 5, 31, 0, 3, 33168, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift - Heal Strengthened Iron Roots'),
(13, 4, 64185, 0, 6, 31, 0, 3, 33170, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift - Heal Sun Beam'),
(13, 4, 64185, 0, 7, 31, 0, 3, 33202, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift - Heal Ancient Water Spirit'),
(13, 4, 64185, 0, 8, 31, 0, 3, 33203, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift - Heal Ancient Conservator'),
(13, 4, 64185, 0, 9, 31, 0, 3, 33215, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift - Heal Healthy Spore'),
(13, 4, 64185, 0, 10, 31, 0, 3, 33228, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift - Heal Eonar''s Gift'),
(13, 4, 64185, 0, 11, 31, 0, 3, 34129, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift - Heal Nature Bomb'),
(13, 1, 63947, 0, 0, 31, 0, 3, 33228, 0, 0, 0, 0, '', 'Freya - Lifebinder''s Gift Heal - Target Eonar''s Gift');
@@ -36,7 +36,7 @@ enum FreyaSpells
// FREYA // FREYA
SPELL_TOUCH_OF_EONAR = 62528, SPELL_TOUCH_OF_EONAR = 62528,
SPELL_ATTUNED_TO_NATURE = 62519, SPELL_ATTUNED_TO_NATURE = 62519,
SPELL_SUMMON_LIFEBINDER = 62870, SPELL_LIFEBINDER_TRIGGER_MISSILE = 62572, // summons Eonar's Gift at the missile impact point
SPELL_SUMMON_WAVE_1 = 62685, // Summon Ancient Conservator SPELL_SUMMON_WAVE_1 = 62685, // Summon Ancient Conservator
SPELL_SUMMON_WAVE_3 = 62686, // Summon Trio (Water Spirit, Storm Lasher, Snaplasher) SPELL_SUMMON_WAVE_3 = 62686, // Summon Trio (Water Spirit, Storm Lasher, Snaplasher)
SPELL_SUMMON_WAVE_10 = 62687, // Summon Detonating Lashers SPELL_SUMMON_WAVE_10 = 62687, // Summon Detonating Lashers
@@ -545,25 +545,10 @@ struct boss_freya : public BossAI
events.Repeat(1min); events.Repeat(1min);
break; break;
case EVENT_FREYA_LIFEBINDER: case EVENT_FREYA_LIFEBINDER:
{ Talk(EMOTE_LIFEBINDERS_GIFT);
Talk(EMOTE_LIFEBINDERS_GIFT); DoCastSelf(SPELL_LIFEBINDER_TRIGGER_MISSILE);
events.Repeat(45s); events.Repeat(45s);
float x, y, z; break;
for (uint8 i = 0; i < 10; ++i)
{
x = me->GetPositionX() + urand(7, 25);
y = me->GetPositionY() + urand(7, 25);
z = me->GetMapHeight(x, y, me->GetPositionZ());
if (me->IsWithinLOS(x, y, z))
{
me->CastSpell(x, y, z, SPELL_SUMMON_LIFEBINDER, true);
return;
}
}
me->CastSpell(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), SPELL_SUMMON_LIFEBINDER, true);
break;
}
case EVENT_FREYA_SUNBEAM: case EVENT_FREYA_SUNBEAM:
if (Unit* target = SelectTarget(SelectTargetMethod::Random)) if (Unit* target = SelectTarget(SelectTargetMethod::Random))
me->CastSpell(target, SPELL_SUNBEAM, false); me->CastSpell(target, SPELL_SUNBEAM, false);
@@ -935,27 +920,28 @@ struct boss_freya_lifebinder : public NullCreatureAI
{ {
} }
uint32 _healTimer;
void Reset() override void Reset() override
{ {
me->CastSpell(me, SPELL_LIFEBINDER_VISUAL, true); me->CastSpell(me, SPELL_LIFEBINDER_VISUAL, false);
me->CastSpell(me, SPELL_LIFEBINDER_PHERONOMES, true); me->CastSpell(me, SPELL_AUTO_GROW, false);
me->CastSpell(me, SPELL_AUTO_GROW, true); me->CastSpell(me, SPELL_LIFEBINDER_PHERONOMES, false);
_healTimer = 0;
_scheduler.CancelAll();
_scheduler.Schedule(12s, [this](TaskContext /*context*/)
{
me->RemoveAurasDueToSpell(SPELL_AUTO_GROW);
me->CastSpell(me, SPELL_LIFEBINDER_HEAL, false);
me->DespawnOrUnsummon(2500ms);
});
} }
void UpdateAI(uint32 diff) override void UpdateAI(uint32 diff) override
{ {
_healTimer += diff; _scheduler.Update(diff);
if (_healTimer >= 12000)
{
me->RemoveAurasDueToSpell(SPELL_AUTO_GROW);
me->CastSpell(me, SPELL_LIFEBINDER_HEAL, true);
me->DespawnOrUnsummon(2s);
_healTimer = 0;
}
} }
private:
TaskScheduler _scheduler;
}; };
struct boss_freya_healthy_spore : public NullCreatureAI struct boss_freya_healthy_spore : public NullCreatureAI