fix(Scripts/SSC): make Fathomlord use his Spitfire Totem ability (#17674)
* initial * new spell/aurascript format * leftover
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
--
|
||||||
|
DELETE FROM `spell_script_names` WHERE `spell_id` = 38452 AND `ScriptName` = 'spell_karathress_power_of_tidalvess';
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||||
|
(38452, 'spell_karathress_power_of_tidalvess');
|
||||||
+34
-21
@@ -113,6 +113,11 @@ struct boss_fathomlord_karathress : public BossAI
|
|||||||
summon->SetWalk(true);
|
summon->SetWalk(true);
|
||||||
summon->GetMotionMaster()->MovePoint(0, advisorsPosition[MAX_ADVISORS - 1], false);
|
summon->GetMotionMaster()->MovePoint(0, advisorsPosition[MAX_ADVISORS - 1], false);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
summon->Attack(me->GetVictim(), false);
|
||||||
|
summon->SetInCombatWithZone();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SummonedCreatureDies(Creature* summon, Unit*) override
|
void SummonedCreatureDies(Creature* summon, Unit*) override
|
||||||
@@ -541,31 +546,38 @@ private:
|
|||||||
InstanceScript* _instance;
|
InstanceScript* _instance;
|
||||||
};
|
};
|
||||||
|
|
||||||
class spell_karathress_power_of_caribdis : public SpellScriptLoader
|
class spell_karathress_power_of_tidalvess : public AuraScript
|
||||||
{
|
{
|
||||||
public:
|
PrepareAuraScript(spell_karathress_power_of_tidalvess);
|
||||||
spell_karathress_power_of_caribdis() : SpellScriptLoader("spell_karathress_power_of_caribdis") { }
|
|
||||||
|
|
||||||
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)
|
void Register() override
|
||||||
{
|
|
||||||
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
|
|
||||||
{
|
{
|
||||||
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_sharkkis);
|
||||||
RegisterSerpentShrineAI(boss_fathomguard_tidalvess);
|
RegisterSerpentShrineAI(boss_fathomguard_tidalvess);
|
||||||
RegisterSerpentShrineAI(boss_fathomguard_caribdis);
|
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