Paladin SPELL_DAMAGE_CLASS_RANGED and SPELL_DAMAGE_CLASS_MELEE
Mangoszero R21
1.
Seal of command spellid=20375
EffectTriggerSpell = 20424 DmgClass = SPELL_DAMAGE_CLASS_MELEE
2.
Hammer of Wrath spellid= 24275
DmgClass = SPELL_DAMAGE_CLASS_RANGED
Sanctity Aura spellid= 20218
Increases Holy damage done by party members within 30 yards by 10%. Players may only have one Aura on them per Paladin at any one time.
Vengeance spellid=20049
Gives you a 3% bonus to Physical and Holy damage you deal for 8 sec after dealing a critical strike from a weapon swing, spell, or ability.
Sanctity Aura and Vengeance can't increases holy damage done for Seal of command and Hammer of Wrath .
void Unit::CalculateSpellDamage(SpellNonMeleeDamage* damageInfo, int32 damage, SpellEntry const* spellInfo, WeaponAttackType attackType)
{
SpellSchoolMask damageSchoolMask = GetSchoolMask(damageInfo->school);
Unit* pVictim = damageInfo->target;
if (damage { return; }
if (!this || !pVictim)
{ return; }
// units which are not alive cannot deal damage except for dying creatures
if ((!this->IsAlive() || !pVictim->IsAlive()) && (this->GetTypeId() != TYPEID_UNIT || this->GetDeathState() != DEAD))
{ return; }
// Check spell crit chance
bool crit = IsSpellCrit(pVictim, spellInfo, damageSchoolMask, attackType);
// damage bonus (per damage class)
switch (spellInfo->DmgClass)
{
// Melee and Ranged Spells
case SPELL_DAMAGE_CLASS_RANGED:
case SPELL_DAMAGE_CLASS_MELEE:
{
// Calculate damage bonus
damage = MeleeDamageBonusDone(pVictim, damage, attackType, spellInfo, SPELL_DIRECT_DAMAGE);
damage = pVictim->MeleeDamageBonusTaken(this, damage, attackType, spellInfo, SPELL_DIRECT_DAMAGE);
// if crit add critical bonus
if (crit)
{
damageInfo->HitInfo |= SPELL_HIT_TYPE_CRIT;
damage = SpellCriticalDamageBonus(spellInfo, damage, pVictim);
}
}
break;
// Magical Attacks
case SPELL_DAMAGE_CLASS_NONE:
case SPELL_DAMAGE_CLASS_MAGIC:
{
// Calculate damage bonus
damage = SpellDamageBonusDone(pVictim, spellInfo, damage, SPELL_DIRECT_DAMAGE);
damage = pVictim->SpellDamageBonusTaken(this, spellInfo, damage, SPELL_DIRECT_DAMAGE);
// If crit add critical bonus
if (crit)
{
damageInfo->HitInfo |= SPELL_HIT_TYPE_CRIT;
damage = SpellCriticalDamageBonus(spellInfo, damage, pVictim);
}
}
break;
}
// damage mitigation
if (damage > 0)
{
// physical damage => armor
if (damageSchoolMask & SPELL_SCHOOL_MASK_NORMAL)
{ damage = CalcArmorReducedDamage(pVictim, damage); }
}
else
{ damage = 0; }
damageInfo->damage = damage;
}
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now