diff --git a/sql/updates/world/custom/custom_2019_08_16_00_world.sql b/sql/updates/world/custom/custom_2019_08_16_00_world.sql new file mode 100644 index 0000000000..a8df57447f --- /dev/null +++ b/sql/updates/world/custom/custom_2019_08_16_00_world.sql @@ -0,0 +1 @@ +UPDATE `spell_bonus_data` SET `ap_dot_bonus`= 0 WHERE `entry` IN (55078, 55095); diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index 0144d7aac8..0df5b6ba53 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -1668,6 +1668,20 @@ class spell_dk_disease : public AuraScript }); } + void CalculateAmount(AuraEffect const* /*aurEff*/, int32 &amount, bool & /*canBeRecalculated*/) + { + Unit* caster = GetCaster(); + if (!caster) + return; + + printf("amount = %i \n", amount); + // Formular: ${$m1*1.15+$AP*0.055*1.15} + AddPct(amount, 15); + printf("new amount = %i \n", amount); + amount += ((caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.055f) * 1.15f); + printf("final amount = %i \n", amount); + } + void HandleResilientInfection(DispelInfo* /*dispelInfo*/) { Unit* caster = GetCaster(); @@ -1687,6 +1701,7 @@ class spell_dk_disease : public AuraScript void Register() override { + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dk_disease::CalculateAmount, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE); AfterDispel += AuraDispelFn(spell_dk_disease::HandleResilientInfection); } };