diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 9248840aa..77a2ba1c1 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -6070,21 +6070,21 @@ void Unit::UnsummonAllTotems() totem->UnSummon(); } -int32 Unit::DealHeal(Unit *pVictim, uint32 addhealth, SpellEntry const *spellProto, bool critical, uint32 absorb) +int32 Unit::DealHeal(Unit* pVictim, uint32 addhealth, SpellEntry const* spellProto, bool critical, uint32 absorb) { int32 gain = pVictim->ModifyHealth(int32(addhealth)); Unit* unit = this; - if( GetTypeId()==TYPEID_UNIT && ((Creature*)this)->IsTotem() && ((Totem*)this)->GetTotemType()!=TOTEM_STATUE) + if (GetTypeId() == TYPEID_UNIT && ((Creature*)this)->IsTotem() && ((Totem*)this)->GetTotemType() != TOTEM_STATUE) unit = GetOwner(); - if (unit->GetTypeId()==TYPEID_PLAYER) - { - // overheal = addhealth - gain - unit->SendHealSpellLog(pVictim, spellProto->Id, addhealth, addhealth - gain, critical, absorb); + // overheal = addhealth - gain + unit->SendHealSpellLog(pVictim, spellProto->Id, addhealth, addhealth - gain, critical, absorb); - if (BattleGround *bg = ((Player*)unit)->GetBattleGround()) + if (unit->GetTypeId() == TYPEID_PLAYER) + { + if (BattleGround* bg = ((Player*)unit)->GetBattleGround()) bg->UpdatePlayerScore((Player*)unit, SCORE_HEALING_DONE, gain); // use the actual gain, as the overheal shall not be counted, skip gain 0 (it ignored anyway in to criteria) @@ -6094,7 +6094,7 @@ int32 Unit::DealHeal(Unit *pVictim, uint32 addhealth, SpellEntry const *spellPro ((Player*)unit)->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEAL_CASTED, addhealth); } - if (pVictim->GetTypeId()==TYPEID_PLAYER) + if (pVictim->GetTypeId() == TYPEID_PLAYER) { ((Player*)pVictim)->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_TOTAL_HEALING_RECEIVED, gain); ((Player*)pVictim)->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEALING_RECEIVED, addhealth); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 34e91397f..ab640d407 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11932" + #define REVISION_NR "11933" #endif // __REVISION_NR_H__