mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[11933] Show Combat log entries for heals from NPCs
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
a2b6888d84
commit
fdfc6dece6
2 changed files with 9 additions and 9 deletions
|
|
@ -6070,21 +6070,21 @@ void Unit::UnsummonAllTotems()
|
||||||
totem->UnSummon();
|
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));
|
int32 gain = pVictim->ModifyHealth(int32(addhealth));
|
||||||
|
|
||||||
Unit* unit = this;
|
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();
|
unit = GetOwner();
|
||||||
|
|
||||||
if (unit->GetTypeId()==TYPEID_PLAYER)
|
|
||||||
{
|
|
||||||
// overheal = addhealth - gain
|
// overheal = addhealth - gain
|
||||||
unit->SendHealSpellLog(pVictim, spellProto->Id, addhealth, addhealth - gain, critical, absorb);
|
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);
|
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)
|
// 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);
|
((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_TOTAL_HEALING_RECEIVED, gain);
|
||||||
((Player*)pVictim)->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEALING_RECEIVED, addhealth);
|
((Player*)pVictim)->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEALING_RECEIVED, addhealth);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11932"
|
#define REVISION_NR "11933"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue