Skip to content

Scripts/HallsOfInfusion: Implement Watcher Irideus encounter - #32168

Open
aquadeus wants to merge 2 commits into
TrinityCore:masterfrom
aquadeus:boss_watcher_irideus
Open

aquadeus wants to merge 2 commits into
TrinityCore:masterfrom
aquadeus:boss_watcher_irideus

Conversation

@aquadeus

Copy link
Copy Markdown
Contributor

Changes proposed:

  • Implement Watcher Irideus encounter

Tests performed:

Tested in-game

case Events::PowerOverload:
{
DoCastSelf(Spells::PowerOverload);
events.Repeat(27700s);

@Nyr97 Nyr97 Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be 27700ms or 27s + 700ms


void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_watcher_irideus_siphon_power::PeriodicTick, EFFECT_0, SPELL_AURA_OBS_MOD_POWER);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Effect 0 of 389056 is SPELL_AURA_DUMMY on the Power Device while the periodic SPELL_AURA_OBS_MOD_POWER is effect 1, on the caster, which will never bind due to dbc effect data not matching

if (aurApp->GetBase()->GetId() != Spells::AblativeBarrier)
return;

if (aurApp->GetRemoveMode() != AURA_REMOVE_BY_DEFAULT)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the group doesn't destroy 3 devices in time, the aura expires with AURA_REMOVE_BY_EXPIRE, this will return early and the boss will become dummy

return;

if (aurApp->GetRemoveMode() != AURA_REMOVE_BY_DEFAULT)
return;

@Nyr97 Nyr97 Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_EnterEvadeMode() calls RemoveAurasOnEvade(), which uses BY_DEFAULT as well, a wipe during the barrier will likely call the talk, schedule events, fire sparks, etc., it's minor since it despawns anyway but

} };

at->SetTimeToTargetScale(defaultTimeToTargetScale);
at->SetOverrideScaleCurve(points, 2);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

second argument is startTimeOffset, not number of points, curve progress is (TimeSinceCreated - StartTimeOffset) / TimeToTargetScale, any resize happens at least 4s after creation, so progress is already 1 and the field snaps to its new size instead of growing over resizeTime, dropping 2 on the first call and pass at->GetTimeSinceCreated() on the resize should suffice


void SpellHitTarget(WorldObject* target, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == Spells::PowerOverload)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

389179 uses MaxTargets 2, both talks are called twice with 2 people in the group


Talk(Texts::BarrierRemoved);
me->SetReactState(REACT_AGGRESSIVE);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Siphon Power is a 40s channel, nothing stops it when it drops and UpdateAI returns while the boss casts, you likely need me->InterruptNonMeleeSpells(true) here


void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) const
{
if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE || GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_ENEMY_SPELL)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove mode cant be EXPIRE and ENEMY_SPELL at once, use &&

return;

if (Unit* caster = GetCaster())
caster->CastSpell(GetTarget()->GetPosition(), Spells::PowerFieldAreaTrigger, CastSpellExtraArgsInit{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong target, 389180 effect 0 is TARGET_DEST_TARGET_ANY, it needs a unit target, not position, position is obtained internally through the target


void HandleOnHit() const
{
GetCaster()->CastSpell(*GetHitDest(), Spells::SparkVolleyMissile, CastSpellExtraArgsInit{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

383952 is TARGET_DEST_CASTER / TARGET_DEST_DEST_RANDOM, OnHit can never fire because no unit is hit


void HandleOnHit() const
{
GetCaster()->CastSpell(*GetHitDest(), Spells::SparkVolleyMissile, CastSpellExtraArgsInit{

@Nyr97 Nyr97 Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GetHitDest() returns nullptr outside effect hooks, use OnEffectHit in any case

DELETE FROM `smart_scripts` WHERE `entryorguid` IN (196717, 196712) AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `Difficulties`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param_string`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `action_param7`, `action_param_string`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_param_string`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(196712, 0, 0, 1, '', 63, 0, 100, 0, 0, 0, 0, 0, 0, '', 85, 389219, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Nullification Device - On Just Created - Cast Self \'Containment Apparatus\''),
(196712, 0, 1, 2, '', 61, 0, 100, 0, 0, 0, 0, 0, 0, '', 69, 1, 0, 0, 0, 0, 0, 0, NULL, 5, 100, 0, 0, 0, NULL, 0, 0, 0, 0, 'Nullification Device - On Linked Event - Move To Hostile Random'),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when the just-created event fires, the device's threat list is still empty (AI init runs in AddToWorld, before InitSummon reaches BossAI::JustSummoned)

it's likely that SMART_TARGET_HOSTILE_RANDOM finds nothing and the move never happens by then

(196712, 0, 3, 0, '', 0, 0, 100, 0, 6000, 6000, 6000, 8000, 0, '', 11, 389443, 0, 0, 0, 0, 0, 0, NULL, 5, 100, 0, 0, 0, NULL, 0, 0, 0, 0, 'Nullification Device - In Combat - Cast \'Purifying Blast\' to Hostile Random'),
(196712, 0, 4, 5, '', 2, 0, 100, 1, 0, 1, 0, 0, 0, '', 85, 389446, 1, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Nullification Device - At 1% HP - Cast \'Nullifying Pulse\''),
(196712, 0, 5, 0, '', 61, 0, 100, 0, 0, 0, 0, 0, 0, '', 41, 3500, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Nullification Device - On Linked Event - Despawn'),
(196717, 0, 0, 0, '', 8, 0, 100, 1, 389056, 0, 0, 0, 0, '', 85, 389092, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Power Device - On Spell hit - Cast Self Siphon Power');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SMART_EVENT_FLAG_NOT_REPEATABLE is only reset by SmartScript::OnReset() and the Power Device never gets in combat, a wipe will make it never react to 389056 again on the next pull, careful

INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `Difficulties`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param_string`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `action_param7`, `action_param_string`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_param_string`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(196712, 0, 0, 1, '', 63, 0, 100, 0, 0, 0, 0, 0, 0, '', 85, 389219, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Nullification Device - On Just Created - Cast Self \'Containment Apparatus\''),
(196712, 0, 1, 2, '', 61, 0, 100, 0, 0, 0, 0, 0, 0, '', 69, 1, 0, 0, 0, 0, 0, 0, NULL, 5, 100, 0, 0, 0, NULL, 0, 0, 0, 0, 'Nullification Device - On Linked Event - Move To Hostile Random'),
(196712, 0, 2, 3, '', 61, 0, 100, 0, 0, 0, 0, 0, 0, '', 42, 1, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Nullification Device - On Just Created - Set Invincibility HP 1'),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SmartAIMgr logs "Link Event 3 not found or invalid" at startup, it should be 0

}
case Events::Barrier:
{
DoCastSelf(Spells::AblativeBarrier, CastSpellExtraArgs(TRIGGERED_FULL_MASK).AddSpellMod(SPELLVALUE_AURA_STACK, 3));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the 3 value is 383840 effect 1 ("grants himself $s2 applications"), so name it or read it from the SpellInfo

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also use TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR preferably? unless you need an additional bit

@Nyr97 Nyr97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few minor details, and some biggies to fix otherwise the encounter cannot be properly tested

}
case Events::Barrier:
{
DoCastSelf(Spells::AblativeBarrier, CastSpellExtraArgs(TRIGGERED_FULL_MASK).AddSpellMod(SPELLVALUE_AURA_STACK, 3));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also use TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR preferably? unless you need an additional bit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants