mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[8207] Allow show combat log for healing done by totems.
(cherry picked from commit 62436f324461648b3b0c3a1a9dee896fc1220343) Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
9b2b2b09ec
commit
454b9a06a8
2 changed files with 12 additions and 7 deletions
|
|
@ -7640,19 +7640,24 @@ int32 Unit::DealHeal(Unit *pVictim, uint32 addhealth, SpellEntry const *spellPro
|
|||
{
|
||||
int32 gain = pVictim->ModifyHealth(int32(addhealth));
|
||||
|
||||
if (GetTypeId()==TYPEID_PLAYER)
|
||||
Unit* unit = this;
|
||||
|
||||
if( GetTypeId()==TYPEID_UNIT && ((Creature*)this)->isTotem() && ((Totem*)this)->GetTotemType()!=TOTEM_STATUE)
|
||||
unit = GetOwner();
|
||||
|
||||
if (unit->GetTypeId()==TYPEID_PLAYER)
|
||||
{
|
||||
// overheal = addhealth - gain
|
||||
SendHealSpellLog(pVictim, spellProto->Id, addhealth, addhealth - gain, critical);
|
||||
unit->SendHealSpellLog(pVictim, spellProto->Id, addhealth, addhealth - gain, critical);
|
||||
|
||||
if (BattleGround *bg = ((Player*)this)->GetBattleGround())
|
||||
bg->UpdatePlayerScore((Player*)this, SCORE_HEALING_DONE, gain);
|
||||
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)
|
||||
if (gain)
|
||||
((Player*)this)->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HEALING_DONE, gain, 0, pVictim);
|
||||
((Player*)unit)->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HEALING_DONE, gain, 0, pVictim);
|
||||
|
||||
((Player*)this)->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEAL_CASTED, addhealth);
|
||||
((Player*)unit)->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEAL_CASTED, addhealth);
|
||||
}
|
||||
|
||||
if (pVictim->GetTypeId()==TYPEID_PLAYER)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8206"
|
||||
#define REVISION_NR "8207"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue