mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[7701] Move explicit healing repeating code to DealHeal functions.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
adf9eb942d
commit
7c0201f834
6 changed files with 24 additions and 31 deletions
|
|
@ -7423,6 +7423,21 @@ void Unit::UnsummonAllTotems()
|
|||
}
|
||||
}
|
||||
|
||||
int32 Unit::DealHeal(Unit *pVictim, uint32 addhealth, SpellEntry const *spellProto, bool critical)
|
||||
{
|
||||
int32 gain = pVictim->ModifyHealth(int32(addhealth));
|
||||
|
||||
if (GetTypeId()==TYPEID_PLAYER)
|
||||
{
|
||||
SendHealSpellLog(pVictim, spellProto->Id, addhealth, critical);
|
||||
|
||||
if (BattleGround *bg = ((Player*)this)->GetBattleGround())
|
||||
bg->UpdatePlayerScore((Player*)this, SCORE_HEALING_DONE, gain);
|
||||
}
|
||||
|
||||
return gain;
|
||||
}
|
||||
|
||||
Unit* Unit::SelectMagnetTarget(Unit *victim, SpellEntry const *spellInfo)
|
||||
{
|
||||
if(!victim)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue