mirror of
https://gitcode.com/GitHub_Trending/az/azerothcore-wotlk.git
synced 2026-10-10 07:06:38 +08:00
fix(Scripts/Ulduar): aim VX-001's Rapid Burst at a stationary Burst Target (#27711)
Co-authored-by: Unholychick <[email protected]>
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
-- Burst Target: VX-001 aims Rapid Burst at it, so it has to stay where it was summoned. Without the trigger flag its
|
||||
-- hostile faction gives it AggressorAI, and it chases the player it was summoned on, dragging the volley along.
|
||||
UPDATE `creature_template` SET `flags_extra` = `flags_extra` | 128 WHERE `entry` = 34211;
|
||||
@@ -69,6 +69,8 @@ enum SpellData
|
||||
SPELL_RAPID_BURST_DAMAGE_1 = 63387,
|
||||
SPELL_RAPID_BURST_DAMAGE_2 = 64019,
|
||||
SPELL_SUMMON_BURST_TARGET = 64840,
|
||||
SPELL_RAPID_BURST_TARGET_ME = 64841,
|
||||
NPC_BURST_TARGET = 34211,
|
||||
|
||||
SPELL_SPINNING_UP = 63414,
|
||||
|
||||
@@ -1399,12 +1401,11 @@ struct npc_ulduar_vx001 : public ScriptedAI
|
||||
}
|
||||
break;
|
||||
case EVENT_SPELL_RAPID_BURST:
|
||||
// 64840 parks a Burst Target where the player stands; the channel is aimed at it from SpellHit
|
||||
// so the damage cones hold one line instead of following the player around
|
||||
if (Player* p = SelectTargetFromPlayerList(80.0f))
|
||||
{
|
||||
me->CastSpell(p, SPELL_RAPID_BURST, true);
|
||||
me->SetFacingToObject(p);
|
||||
}
|
||||
_events.Repeat(3200ms);
|
||||
DoCast(p, SPELL_SUMMON_BURST_TARGET);
|
||||
_events.Repeat(3600ms);
|
||||
break;
|
||||
case EVENT_HAND_PULSE:
|
||||
if (Player* p = SelectTargetFromPlayerList(80.0f))
|
||||
@@ -1508,13 +1509,29 @@ struct npc_ulduar_vx001 : public ScriptedAI
|
||||
p->ToCreature()->DespawnOrUnsummon(8s);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
if (summon->GetEntry() == NPC_BURST_TARGET)
|
||||
{
|
||||
// 64840 has no usable duration, so the aim point is despawned by hand: sniffs put its
|
||||
// lifetime near 11s, which keeps three of them alive across a chain of volleys
|
||||
summon->DespawnOrUnsummon(11s);
|
||||
summon->CastSpell(me, SPELL_RAPID_BURST_TARGET_ME);
|
||||
}
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_SELF_REPAIR)
|
||||
{
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
}
|
||||
else if (caster && spell->Id == SPELL_RAPID_BURST_TARGET_ME && !me->HasUnitState(UNIT_STATE_CASTING))
|
||||
{
|
||||
me->SetFacingToObject(caster);
|
||||
DoCast(caster, SPELL_RAPID_BURST, true);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -2148,7 +2165,8 @@ class spell_mimiron_rapid_burst_aura : public AuraScript
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
uint32 id = (aurEff->GetTickNumber() % 2) ? SPELL_RAPID_BURST_DAMAGE_2 : SPELL_RAPID_BURST_DAMAGE_1;
|
||||
// The first tick of every volley fires 63387; the two barrels alternate from there
|
||||
uint32 id = (aurEff->GetTickNumber() % 2) ? SPELL_RAPID_BURST_DAMAGE_1 : SPELL_RAPID_BURST_DAMAGE_2;
|
||||
caster->CastSpell((Unit*)nullptr, id, true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user