mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 19:35:42 +00:00
fix(Scripts/SSC): make Fathomlord use his Spitfire Totem ability (#17674)
* initial * new spell/aurascript format * leftover
This commit is contained in:
@@ -113,6 +113,11 @@ struct boss_fathomlord_karathress : public BossAI
|
||||
summon->SetWalk(true);
|
||||
summon->GetMotionMaster()->MovePoint(0, advisorsPosition[MAX_ADVISORS - 1], false);
|
||||
}
|
||||
else
|
||||
{
|
||||
summon->Attack(me->GetVictim(), false);
|
||||
summon->SetInCombatWithZone();
|
||||
}
|
||||
}
|
||||
|
||||
void SummonedCreatureDies(Creature* summon, Unit*) override
|
||||
@@ -541,31 +546,38 @@ private:
|
||||
InstanceScript* _instance;
|
||||
};
|
||||
|
||||
class spell_karathress_power_of_caribdis : public SpellScriptLoader
|
||||
class spell_karathress_power_of_tidalvess : public AuraScript
|
||||
{
|
||||
public:
|
||||
spell_karathress_power_of_caribdis() : SpellScriptLoader("spell_karathress_power_of_caribdis") { }
|
||||
PrepareAuraScript(spell_karathress_power_of_tidalvess);
|
||||
|
||||
class spell_karathress_power_of_caribdis_AuraScript : public AuraScript
|
||||
void OnPeriodic(AuraEffect const* aurEff)
|
||||
{
|
||||
PrepareAuraScript(spell_karathress_power_of_caribdis_AuraScript);
|
||||
PreventDefaultAction();
|
||||
GetUnitOwner()->CastSpell(GetUnitOwner(), GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell, true);
|
||||
}
|
||||
|
||||
void OnPeriodic(AuraEffect const* aurEff)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
if (Unit* victim = GetUnitOwner()->GetVictim())
|
||||
GetUnitOwner()->CastSpell(victim, GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell, true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_karathress_power_of_caribdis_AuraScript::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
void Register() override
|
||||
{
|
||||
return new spell_karathress_power_of_caribdis_AuraScript();
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_karathress_power_of_tidalvess::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_karathress_power_of_caribdis : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_karathress_power_of_caribdis);
|
||||
|
||||
void OnPeriodic(AuraEffect const* aurEff)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
if (Unit* victim = GetUnitOwner()->GetVictim())
|
||||
{
|
||||
GetUnitOwner()->CastSpell(victim, GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell, true);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_karathress_power_of_caribdis::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -575,5 +587,6 @@ void AddSC_boss_fathomlord_karathress()
|
||||
RegisterSerpentShrineAI(boss_fathomguard_sharkkis);
|
||||
RegisterSerpentShrineAI(boss_fathomguard_tidalvess);
|
||||
RegisterSerpentShrineAI(boss_fathomguard_caribdis);
|
||||
new spell_karathress_power_of_caribdis();
|
||||
RegisterSpellScript(spell_karathress_power_of_tidalvess);
|
||||
RegisterSpellScript(spell_karathress_power_of_caribdis);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user