mirror of
https://github.com/mangosfour/server.git
synced 2025-12-20 16:37:04 +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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue