mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
Scripts/Spells: Implemented Wyvern Sting script
- Removed old hack with spell_linked_spell
This commit is contained in:
6
sql/updates/world/3.3.5/2019_08_17_00_world.sql
Normal file
6
sql/updates/world/3.3.5/2019_08_17_00_world.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
-- Burn with fire spell_linked_spell hack
|
||||
DELETE FROM spell_linked_spell WHERE `spell_trigger` IN (-19386, -24132, -24133, -27068, -49011, -49012);
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_hun_wyvern_sting';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(-19386,'spell_hun_wyvern_sting');
|
||||
@@ -71,7 +71,13 @@ enum HunterSpells
|
||||
SPELL_HUNTER_GLYPH_OF_MEND_PET_HAPPINESS = 57894,
|
||||
SPELL_HUNTER_EXPLOSIVE_SHOT_DAMAGE = 53352,
|
||||
SPELL_HUNTER_FEEDING_FRENZY_BUFF_R1 = 60096,
|
||||
SPELL_HUNTER_FEEDING_FRENZY_BUFF_R2 = 60097
|
||||
SPELL_HUNTER_FEEDING_FRENZY_BUFF_R2 = 60097,
|
||||
SPELL_HUNTER_WYVERN_STING_DOT_R1 = 24131,
|
||||
SPELL_HUNTER_WYVERN_STING_DOT_R2 = 24134,
|
||||
SPELL_HUNTER_WYVERN_STING_DOT_R3 = 24135,
|
||||
SPELL_HUNTER_WYVERN_STING_DOT_R4 = 27069,
|
||||
SPELL_HUNTER_WYVERN_STING_DOT_R5 = 49009,
|
||||
SPELL_HUNTER_WYVERN_STING_DOT_R6 = 49010
|
||||
};
|
||||
|
||||
// 13161 - Aspect of the Beast
|
||||
@@ -1628,6 +1634,38 @@ class spell_hun_viper_attack_speed : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// -19386 - Wyvern Sting
|
||||
class spell_hun_wyvern_sting : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_hun_wyvern_sting);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo(
|
||||
{
|
||||
SPELL_HUNTER_WYVERN_STING_DOT_R1,
|
||||
SPELL_HUNTER_WYVERN_STING_DOT_R2,
|
||||
SPELL_HUNTER_WYVERN_STING_DOT_R3,
|
||||
SPELL_HUNTER_WYVERN_STING_DOT_R4,
|
||||
SPELL_HUNTER_WYVERN_STING_DOT_R5,
|
||||
SPELL_HUNTER_WYVERN_STING_DOT_R6
|
||||
});
|
||||
}
|
||||
|
||||
void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
uint8 rank = sSpellMgr->GetSpellRank(GetId());
|
||||
uint32 spellId = sSpellMgr->GetSpellWithRank(SPELL_HUNTER_WYVERN_STING_DOT_R1, rank);
|
||||
if (Unit* caster = GetCaster())
|
||||
caster->CastSpell(GetTarget(), spellId, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AfterEffectRemove += AuraEffectRemoveFn(spell_hun_wyvern_sting::OnRemove, EFFECT_0, SPELL_AURA_MOD_STUN, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_hunter_spell_scripts()
|
||||
{
|
||||
new spell_hun_aspect_of_the_beast();
|
||||
@@ -1664,4 +1702,5 @@ void AddSC_hunter_spell_scripts()
|
||||
new spell_hun_thrill_of_the_hunt();
|
||||
new spell_hun_t9_4p_bonus();
|
||||
new spell_hun_viper_attack_speed();
|
||||
RegisterAuraScript(spell_hun_wyvern_sting);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user