scripts/Companions: scripted Singing Sunflower
This commit is contained in:
1 parent
1bac4289d7
commit
60f630027f
2 files changed
+38
No files matched your search
@@ -0,0 +1,11 @@
|
||||
-- Creature Singing Sunflower 51090 SAI
|
||||
SET @ENTRY := 51090;
|
||||
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`= @ENTRY;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(@ENTRY, 0, 0, 0, 63, 0, 100, 0, 0, 0, 0, 0, 11, 93971, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "When just created - Self: Cast spell Sunflower (DND) (93971) on Self // ");
|
||||
|
||||
|
||||
DELETE FROM `spell_script_names`WHERE `ScriptName`= 'spell_gen_sunflower_dnd';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(93971, 'spell_gen_sunflower_dnd');
|
||||
@@ -5129,6 +5129,32 @@ class spell_gen_flurry_of_claws : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
enum Sunflower
|
||||
{
|
||||
SPELL_SINGING_SUNFLOWER_DND = 93972
|
||||
};
|
||||
|
||||
// 93971 - Sunflower (DND)
|
||||
class spell_gen_sunflower_dnd : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_gen_sunflower_dnd);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_SINGING_SUNFLOWER_DND });
|
||||
}
|
||||
|
||||
void HandlePeriodic(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_SINGING_SUNFLOWER_DND);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_gen_sunflower_dnd::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_generic_spell_scripts()
|
||||
{
|
||||
new spell_gen_absorb0_hitlimit1();
|
||||
@@ -5249,4 +5275,5 @@ void AddSC_generic_spell_scripts()
|
||||
RegisterSpellScript(spell_gen_reverse_cast_ride_vehicle);
|
||||
RegisterSpellScript(spell_gen_launch_quest);
|
||||
RegisterSpellScript(spell_gen_charmed_unit_spell_cooldown);
|
||||
RegisterAuraScript(spell_gen_sunflower_dnd);
|
||||
}
|
||||
Reference in new issue
Block a user