From 259690b3ce0d53cabf7ea60e7e5767014e27a268 Mon Sep 17 00:00:00 2001 From: Rushor Date: Thu, 11 Feb 2016 14:40:18 +0100 Subject: [PATCH] [3.3.5] Beast Mastery hunter talent Animal Handler The goal of this PR is to restore the correct AP values for a BM hunter: Animal Handler, Rank 1 - Increases your pet's attack power by 5% and increases the duration of your Master's Call effect by 3 sec. Animal Handler, Rank 2 - Increases your pet's attack power by 10%, and increases the duration of your Master's Call effect by 6 sec. Viewed in talent calculator: http://wotlk.openwow.com/talent#cVbhzTGRb by Rushor, closes #15361 --- sql/updates/world/2016_02_12_13_world_335.sql | 5 +++++ src/server/game/Entities/Unit/StatSystem.cpp | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 sql/updates/world/2016_02_12_13_world_335.sql diff --git a/sql/updates/world/2016_02_12_13_world_335.sql b/sql/updates/world/2016_02_12_13_world_335.sql new file mode 100644 index 00000000000..4871f6de86a --- /dev/null +++ b/sql/updates/world/2016_02_12_13_world_335.sql @@ -0,0 +1,5 @@ +-- animal handler, spell ranks +DELETE FROM `spell_ranks` WHERE `first_spell_id` = 34453; +INSERT INTO `spell_ranks` (`first_spell_id`,`spell_id`,`rank`) VALUES +(34453, 34453, 1), -- Animal Handler, Rank 1 +(34453, 34454, 2); -- Animal Handler, Rank 2 diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp index a8e13a9f7db..39a97d4f5a0 100644 --- a/src/server/game/Entities/Unit/StatSystem.cpp +++ b/src/server/game/Entities/Unit/StatSystem.cpp @@ -1327,6 +1327,11 @@ void Guardian::UpdateAttackPowerAndDamage(bool ranged) } bonusAP = owner->GetTotalAttackPowerValue(RANGED_ATTACK) * 0.22f * mod; + if (AuraEffect* aurEff = owner->GetAuraEffectOfRankedSpell(34453, EFFECT_1, owner->GetGUID())) // Animal Handler + { + AddPct(bonusAP, aurEff->GetAmount()); + AddPct(val, aurEff->GetAmount()); + } SetBonusDamage(int32(owner->GetTotalAttackPowerValue(RANGED_ATTACK) * 0.1287f * mod)); } else if (IsPetGhoul() || IsRisenAlly()) //ghouls benefit from deathknight's attack power (may be summon pet or not)