mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[8428] Implement proper amount absorbed damage for spell 62600.
Other change jus move code under "if(apply) else"
This commit is contained in:
parent
beae3fe00f
commit
a3207da3d9
2 changed files with 105 additions and 95 deletions
|
|
@ -5981,8 +5981,10 @@ void Aura::HandleSchoolAbsorb(bool apply, bool Real)
|
|||
if(!caster)
|
||||
return;
|
||||
|
||||
if (apply)
|
||||
{
|
||||
// prevent double apply bonuses
|
||||
if(apply && (m_target->GetTypeId()!=TYPEID_PLAYER || !((Player*)m_target)->GetSession()->PlayerLoading()))
|
||||
if (m_target->GetTypeId()!=TYPEID_PLAYER || !((Player*)m_target)->GetSession()->PlayerLoading())
|
||||
{
|
||||
float DoneActualBenefit = 0.0f;
|
||||
switch(m_spellProto->SpellFamilyName)
|
||||
|
|
@ -6009,6 +6011,11 @@ void Aura::HandleSchoolAbsorb(bool apply, bool Real)
|
|||
//+30% from +spell bonus
|
||||
DoneActualBenefit = caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.30f;
|
||||
break;
|
||||
case SPELLFAMILY_DRUID:
|
||||
// Savage Defense (amount store original percent of attack power applied)
|
||||
if (m_spellProto->SpellIconID == 50) // only spell with this aura fit
|
||||
m_modifier.m_amount = int32(m_modifier.m_amount * m_target->GetTotalAttackPowerValue(BASE_ATTACK) / 100);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -6017,9 +6024,11 @@ void Aura::HandleSchoolAbsorb(bool apply, bool Real)
|
|||
|
||||
m_modifier.m_amount += (int32)DoneActualBenefit;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// Ice Barrier (remove effect from Shattered Barrier)
|
||||
if(!apply && m_spellProto->SpellIconID == 32 && m_spellProto->SpellFamilyName == SPELLFAMILY_MAGE)
|
||||
if (m_spellProto->SpellIconID == 32 && m_spellProto->SpellFamilyName == SPELLFAMILY_MAGE)
|
||||
{
|
||||
if (!((m_removeMode == AURA_REMOVE_BY_DEFAULT && !m_modifier.m_amount) || m_removeMode == AURA_REMOVE_BY_DISPEL))
|
||||
return;
|
||||
|
|
@ -6035,7 +6044,7 @@ void Aura::HandleSchoolAbsorb(bool apply, bool Real)
|
|||
}
|
||||
}
|
||||
|
||||
if (!apply && caster &&
|
||||
if (caster &&
|
||||
// Power Word: Shield
|
||||
m_spellProto->SpellFamilyName == SPELLFAMILY_PRIEST && m_spellProto->Mechanic == MECHANIC_SHIELD &&
|
||||
(m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000001)) &&
|
||||
|
|
@ -6098,6 +6107,7 @@ void Aura::HandleSchoolAbsorb(bool apply, bool Real)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Aura::PeriodicTick()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8427"
|
||||
#define REVISION_NR "8428"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue