mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[10669] Fixed mana amount for overheal case for talent 31785 and ranks.
Also thanks to Wojta for patch code improvements. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
97ff7e6006
commit
ee1b18cd20
2 changed files with 9 additions and 3 deletions
|
|
@ -1873,8 +1873,14 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
|
|||
if (this == pVictim)
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
|
||||
// heal amount
|
||||
basepoints[0] = triggerAmount*damage/100;
|
||||
// dont count overhealing
|
||||
uint32 diff = GetMaxHealth()-GetHealth();
|
||||
if (!diff)
|
||||
return SPELL_AURA_PROC_FAILED;
|
||||
if (damage > diff)
|
||||
basepoints[0] = triggerAmount*diff/100;
|
||||
else
|
||||
basepoints[0] = triggerAmount*damage/100;
|
||||
target = this;
|
||||
triggered_spell_id = 31786;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10668"
|
||||
#define REVISION_NR "10669"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue