mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[10479] Implement heak absorb for periodic heal
Also fix SMSG_PERIODICAURALOG for periodic heal for 3.5.5 Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
6af66f1ae4
commit
919dc87bac
3 changed files with 11 additions and 4 deletions
|
|
@ -6742,11 +6742,17 @@ void Aura::PeriodicTick()
|
|||
// This method can modify pdamage
|
||||
bool isCrit = IsCritFromAbilityAura(pCaster, pdamage);
|
||||
|
||||
DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %u (TypeId: %u) heal of %u (TypeId: %u) for %u health inflicted by %u",
|
||||
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), pdamage, GetId());
|
||||
uint32 absorbHeal = 0;
|
||||
pCaster->CalculateHealAbsorb(pdamage, &absorbHeal);
|
||||
pdamage -= absorbHeal;
|
||||
|
||||
DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %u (TypeId: %u) heal of %u (TypeId: %u) for %u health (absorbed %u) inflicted by %u",
|
||||
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), pdamage, absorbHeal, GetId());
|
||||
|
||||
|
||||
|
||||
int32 gain = target->ModifyHealth(pdamage);
|
||||
SpellPeriodicAuraLogInfo pInfo(this, pdamage, (pdamage - uint32(gain)), 0, 0, 0.0f, isCrit);
|
||||
SpellPeriodicAuraLogInfo pInfo(this, pdamage, (pdamage - uint32(gain)), absorbHeal, 0, 0.0f, isCrit);
|
||||
target->SendPeriodicAuraLog(&pInfo);
|
||||
|
||||
// Set trigger flag
|
||||
|
|
|
|||
|
|
@ -5077,6 +5077,7 @@ void Unit::SendPeriodicAuraLog(SpellPeriodicAuraLogInfo *pInfo)
|
|||
case SPELL_AURA_OBS_MOD_HEALTH:
|
||||
data << uint32(pInfo->damage); // damage
|
||||
data << uint32(pInfo->overDamage); // overheal?
|
||||
data << uint32(pInfo->absorb); // absorb
|
||||
data << uint8(pInfo->critical ? 1 : 0); // new 3.1.2 critical flag
|
||||
break;
|
||||
case SPELL_AURA_OBS_MOD_MANA:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10478"
|
||||
#define REVISION_NR "10479"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue