diff options
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 6cb446af503..97bd836f5de 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -665,6 +665,7 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa } } + killer->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_DAMAGE_DONE, damage, 0, pVictim); killer->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HIT_DEALT, damage); } @@ -8168,12 +8169,9 @@ int32 Unit::DealHeal(Unit *pVictim, uint32 addhealth, SpellEntry const *spellPro if (BattleGround *bg = ((Player*)this)->GetBattleGround()) bg->UpdatePlayerScore((Player*)this, SCORE_HEALING_DONE, gain); - // healing done is count ONLY if the target is a player. - if (pVictim->GetTypeId()==TYPEID_PLAYER) - { - // use the actual gain, as the overheal shall not be counted. - ((Player*)this)->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HEALING_DONE, gain); - } + // use the actual gain, as the overheal shall not be counted, skip gain 0 (it ignored anyway in to criteria) + if (gain) + ((Player*)this)->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HEALING_DONE, gain, 0, pVictim); ((Player*)this)->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEAL_CASTED, addhealth); } |