Skip to content

Commit

Permalink
Merge pull request #39 from dongkui555/修复邪DK天鬼伤害
Browse files Browse the repository at this point in the history
修复邪DK天鬼伤害
  • Loading branch information
dongkui555 authored May 19, 2024
2 parents 54c309a + 7186fe8 commit 9046c46
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/server/scripts/Pet/pet_dk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,9 @@ class spell_pet_dk_gargoyle_strike : public SpellScript
int32 damage = 60;
if (Unit* caster = GetCaster())
{
int32 ap = 0;
if (Unit* owner = caster->GetOwner())
ap = owner->GetInt32Value(UNIT_FIELD_ATTACK_POWER) + owner->GetInt32Value(UNIT_FIELD_ATTACK_POWER_MODS);
if (caster->GetLevel() >= 60)
{
damage += (caster->GetLevel() - 60) * 3;
Expand All @@ -363,7 +366,7 @@ class spell_pet_dk_gargoyle_strike : public SpellScript

void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_pet_dk_gargoyle_strike::HandleDamageCalc, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
OnEffectLaunchTarget += SpellEffectFn(spell_pet_dk_gargoyle_strike::HandleDamageCalc, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
}
};

Expand Down

0 comments on commit 9046c46

Please sign in to comment.