mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[c12611] Implement virtual void HealedBy
This commit is contained in:
parent
662d4ac061
commit
8a3be45af0
3 changed files with 11 additions and 3 deletions
|
|
@ -102,8 +102,12 @@ class MANGOS_DLL_SPEC CreatureAI
|
|||
*/
|
||||
virtual void JustReachedHome() {}
|
||||
|
||||
// Called at any heal cast/item used (call non implemented)
|
||||
// virtual void HealBy(Unit * /*healer*/, uint32 /*amount_healed*/) {}
|
||||
/**
|
||||
* Called at any Heal received from any Unit
|
||||
* @param pHealer Unit* which deals the heal
|
||||
* @param uiHealedAmount Amount of healing received
|
||||
*/
|
||||
virtual void HealedBy(Unit * /*pHealer*/, uint32& /*uiHealedAmount*/) {}
|
||||
|
||||
/**
|
||||
* Called at any Damage to any victim (before damage apply)
|
||||
|
|
|
|||
|
|
@ -6472,6 +6472,10 @@ int32 Unit::DealHeal(Unit* pVictim, uint32 addhealth, SpellEntry const* spellPro
|
|||
((Player*)pVictim)->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_HEALING_RECEIVED, addhealth);
|
||||
}
|
||||
|
||||
// Script Event HealedBy
|
||||
if (pVictim->GetTypeId() == TYPEID_UNIT && ((Creature*)pVictim)->AI())
|
||||
((Creature*)pVictim)->AI()->HealedBy(this, addhealth);
|
||||
|
||||
return gain;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "12610"
|
||||
#define REVISION_NR "12611"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue