mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix(Scripts/Underbog): Underbog Shambler's Allergies should periodica… (#14563)
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
--
|
||||
UPDATE `spell_script_names` SET `ScriptName`='spell_allergies' WHERE `spell_id`=31427;
|
||||
@@ -142,28 +142,6 @@ struct boss_the_black_stalker : public BossAI
|
||||
}
|
||||
};
|
||||
|
||||
class spell_gen_allergies : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_gen_allergies);
|
||||
|
||||
void CalcPeriodic(AuraEffect const* /*effect*/, bool& isPeriodic, int32& amplitude)
|
||||
{
|
||||
isPeriodic = true;
|
||||
amplitude = urand(10 * IN_MILLISECONDS, 200 * IN_MILLISECONDS);
|
||||
}
|
||||
|
||||
void Update(AuraEffect* /*effect*/)
|
||||
{
|
||||
SetDuration(0);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoEffectCalcPeriodic += AuraEffectCalcPeriodicFn(spell_gen_allergies::CalcPeriodic, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(spell_gen_allergies::Update, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
// 31704 - Levitate
|
||||
class spell_the_black_stalker_levitate : public SpellScript
|
||||
{
|
||||
@@ -252,7 +230,6 @@ class spell_the_black_stalker_magnetic_pull : public SpellScript
|
||||
void AddSC_boss_the_black_stalker()
|
||||
{
|
||||
RegisterUnderbogCreatureAI(boss_the_black_stalker);
|
||||
RegisterSpellScript(spell_gen_allergies);
|
||||
RegisterSpellScript(spell_the_black_stalker_levitate);
|
||||
RegisterSpellScript(spell_the_black_stalker_levitation_pulse);
|
||||
RegisterSpellScript(spell_the_black_stalker_someone_grab_me);
|
||||
|
||||
@@ -40,7 +40,38 @@ class spell_fungal_decay : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
enum AllergiesEnum
|
||||
{
|
||||
SPELL_SNEEZE = 31428
|
||||
};
|
||||
|
||||
class spell_allergies : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_allergies);
|
||||
|
||||
void CalcPeriodic(AuraEffect const* /*effect*/, bool& isPeriodic, int32& amplitude)
|
||||
{
|
||||
isPeriodic = true;
|
||||
amplitude = urand(10 * IN_MILLISECONDS, 60 * IN_MILLISECONDS);
|
||||
}
|
||||
|
||||
void Update(AuraEffect* /*effect*/)
|
||||
{
|
||||
if (Unit* target = GetUnitOwner())
|
||||
{
|
||||
target->CastSpell(target, SPELL_SNEEZE, true);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoEffectCalcPeriodic += AuraEffectCalcPeriodicFn(spell_allergies::CalcPeriodic, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(spell_allergies::Update, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_underbog()
|
||||
{
|
||||
RegisterSpellScript(spell_fungal_decay);
|
||||
RegisterSpellScript(spell_allergies);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user