aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMikhail Redko <ovitnez@gmail.com>2021-01-06 21:43:20 +0200
committerGitHub <noreply@github.com>2021-01-06 20:43:20 +0100
commit65083dc9365d218ea85314d3f7f5708c1cfd597a (patch)
tree139da7e27eaf9b11726929f301d2879cd6bf936a /src
parent12a3557fb2b881cc0f5c3db5968826ceb45279e3 (diff)
Scripts/Spells: Implement hunter pet talent "Improved Cower" (#25804)
* Scripts/Spells: Implement hunter pet talent "Improved Cower" Closes #25600 * Rename XXXX_XX_XX_XX_world.sql to 2021_01_06_07_world.sql Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp
index 7aac8eba8ee..5eb840dd321 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -80,6 +80,11 @@ enum HunterSpells
SPELL_HUNTER_WYVERN_STING_DOT_R6 = 49010
};
+enum HunterSpellIcons
+{
+ SPELL_ICON_HUNTER_PET_IMPROVED_COWER = 958
+};
+
// 13161 - Aspect of the Beast
class spell_hun_aspect_of_the_beast : public SpellScriptLoader
{
@@ -960,6 +965,23 @@ class spell_hun_misdirection_proc : public SpellScriptLoader
}
};
+// 1742 - Pet Cower
+class spell_hun_pet_cower : public AuraScript
+{
+ PrepareAuraScript(spell_hun_pet_cower);
+
+ void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
+ {
+ if (AuraEffect const* improvedCower = GetUnitOwner()->GetDummyAuraEffect(SPELLFAMILY_PET, SPELL_ICON_HUNTER_PET_IMPROVED_COWER, EFFECT_0))
+ AddPct(amount, improvedCower->GetAmount());
+ }
+
+ void Register() override
+ {
+ DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_hun_pet_cower::CalculateAmount, EFFECT_1, SPELL_AURA_MOD_DECREASE_SPEED);
+ }
+};
+
// 54044 - Pet Carrion Feeder
class spell_hun_pet_carrion_feeder : public SpellScriptLoader
{
@@ -1698,6 +1720,7 @@ void AddSC_hunter_spell_scripts()
new spell_hun_masters_call();
new spell_hun_misdirection();
new spell_hun_misdirection_proc();
+ RegisterSpellScript(spell_hun_pet_cower);
new spell_hun_pet_carrion_feeder();
new spell_hun_pet_heart_of_the_phoenix();
new spell_hun_piercing_shots();