Missing part of previous commit (Periodic Leech is DoT as well)
Fix talents Improved Rend and Gag Order not increasing whole damage of affected spells (applying effect modifiers - spellmod_effectx should be however done for every static damage added to already calculated damage, we can't just apply all spellmods after effects are processed...) --HG-- branch : trunk
This commit is contained in:
@@ -588,7 +588,7 @@ int32 AuraEffect::CalculateAmount(Unit * caster)
|
|||||||
int32 mws = caster->GetAttackTime(BASE_ATTACK);
|
int32 mws = caster->GetAttackTime(BASE_ATTACK);
|
||||||
float mwb_min = caster->GetWeaponDamageRange(BASE_ATTACK,MINDAMAGE);
|
float mwb_min = caster->GetWeaponDamageRange(BASE_ATTACK,MINDAMAGE);
|
||||||
float mwb_max = caster->GetWeaponDamageRange(BASE_ATTACK,MAXDAMAGE);
|
float mwb_max = caster->GetWeaponDamageRange(BASE_ATTACK,MAXDAMAGE);
|
||||||
amount+=int32(((mwb_min+mwb_max)/2+ap*mws/14000)*0.2f);
|
amount+=caster->ApplyEffectModifiers(m_spellProto,m_effIndex,int32(((mwb_min+mwb_max)/2+ap*mws/14000)*0.2f));
|
||||||
// "If used while your target is above 75% health, Rend does 35% more damage."
|
// "If used while your target is above 75% health, Rend does 35% more damage."
|
||||||
// as for 3.1.3 only ranks above 9 (wrong tooltip?)
|
// as for 3.1.3 only ranks above 9 (wrong tooltip?)
|
||||||
if (spellmgr.GetSpellRank(m_spellProto->Id) >= 9)
|
if (spellmgr.GetSpellRank(m_spellProto->Id) >= 9)
|
||||||
@@ -1333,7 +1333,10 @@ void AuraEffect::PeriodicTick(Unit * target, Unit * caster) const
|
|||||||
|
|
||||||
bool crit = IsPeriodicTickCrit(target, caster);
|
bool crit = IsPeriodicTickCrit(target, caster);
|
||||||
if (crit)
|
if (crit)
|
||||||
|
{
|
||||||
damage = caster->SpellCriticalDamageBonus(m_spellProto, damage, target);
|
damage = caster->SpellCriticalDamageBonus(m_spellProto, damage, target);
|
||||||
|
damage -= target->GetSpellCritDamageReduction(damage);
|
||||||
|
}
|
||||||
|
|
||||||
//Calculate armor mitigation if it is a physical spell
|
//Calculate armor mitigation if it is a physical spell
|
||||||
if (GetSpellSchoolMask(GetSpellProto()) & SPELL_SCHOOL_MASK_NORMAL)
|
if (GetSpellSchoolMask(GetSpellProto()) & SPELL_SCHOOL_MASK_NORMAL)
|
||||||
|
|||||||
@@ -438,7 +438,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
|
|||||||
damage = uint32(damage * (m_caster->GetTotalAttackPowerValue(BASE_ATTACK)) / 100);
|
damage = uint32(damage * (m_caster->GetTotalAttackPowerValue(BASE_ATTACK)) / 100);
|
||||||
// Shield Slam
|
// Shield Slam
|
||||||
else if (m_spellInfo->SpellFamilyFlags[1] & 0x200 && m_spellInfo->Category == 1209)
|
else if (m_spellInfo->SpellFamilyFlags[1] & 0x200 && m_spellInfo->Category == 1209)
|
||||||
damage += int32(m_caster->GetShieldBlockValue());
|
damage += m_caster->ApplyEffectModifiers(m_spellInfo,effect_idx,int32(m_caster->GetShieldBlockValue()));
|
||||||
// Victory Rush
|
// Victory Rush
|
||||||
else if (m_spellInfo->SpellFamilyFlags[1] & 0x100)
|
else if (m_spellInfo->SpellFamilyFlags[1] & 0x100)
|
||||||
{
|
{
|
||||||
|
|||||||
+22
-16
@@ -12212,6 +12212,27 @@ Unit* Creature::SelectVictim()
|
|||||||
//======================================================================
|
//======================================================================
|
||||||
//======================================================================
|
//======================================================================
|
||||||
|
|
||||||
|
int32 Unit::ApplyEffectModifiers(SpellEntry const* spellProto, uint8 effect_index, int32 value)
|
||||||
|
{
|
||||||
|
if (Player* modOwner = GetSpellModOwner())
|
||||||
|
{
|
||||||
|
modOwner->ApplySpellMod(spellProto->Id,SPELLMOD_ALL_EFFECTS, value);
|
||||||
|
switch (effect_index)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
modOwner->ApplySpellMod(spellProto->Id,SPELLMOD_EFFECT1, value);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
modOwner->ApplySpellMod(spellProto->Id,SPELLMOD_EFFECT2, value);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
modOwner->ApplySpellMod(spellProto->Id,SPELLMOD_EFFECT3, value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
int32 Unit::CalculateSpellDamage(SpellEntry const* spellProto, uint8 effect_index, int32 effBasePoints, Unit const* /*target*/)
|
int32 Unit::CalculateSpellDamage(SpellEntry const* spellProto, uint8 effect_index, int32 effBasePoints, Unit const* /*target*/)
|
||||||
{
|
{
|
||||||
int32 level = int32(getLevel());
|
int32 level = int32(getLevel());
|
||||||
@@ -12239,22 +12260,7 @@ int32 Unit::CalculateSpellDamage(SpellEntry const* spellProto, uint8 effect_inde
|
|||||||
if (float comboDamage = spellProto->EffectPointsPerComboPoint[effect_index])
|
if (float comboDamage = spellProto->EffectPointsPerComboPoint[effect_index])
|
||||||
value += int32(comboDamage * comboPoints);
|
value += int32(comboDamage * comboPoints);
|
||||||
|
|
||||||
if (Player* modOwner = GetSpellModOwner())
|
value = ApplyEffectModifiers(spellProto, effect_index, value);
|
||||||
{
|
|
||||||
modOwner->ApplySpellMod(spellProto->Id,SPELLMOD_ALL_EFFECTS, value);
|
|
||||||
switch (effect_index)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
modOwner->ApplySpellMod(spellProto->Id,SPELLMOD_EFFECT1, value);
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
modOwner->ApplySpellMod(spellProto->Id,SPELLMOD_EFFECT2, value);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
modOwner->ApplySpellMod(spellProto->Id,SPELLMOD_EFFECT3, value);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!basePointsPerLevel && (spellProto->Attributes & SPELL_ATTR_LEVEL_DAMAGE_CALCULATION && spellProto->spellLevel) &&
|
if (!basePointsPerLevel && (spellProto->Attributes & SPELL_ATTR_LEVEL_DAMAGE_CALCULATION && spellProto->spellLevel) &&
|
||||||
spellProto->Effect[effect_index] != SPELL_EFFECT_WEAPON_PERCENT_DAMAGE &&
|
spellProto->Effect[effect_index] != SPELL_EFFECT_WEAPON_PERCENT_DAMAGE &&
|
||||||
|
|||||||
@@ -1838,6 +1838,7 @@ class Unit : public WorldObject
|
|||||||
void SetHover(bool on);
|
void SetHover(bool on);
|
||||||
bool isHover() const { return HasAuraType(SPELL_AURA_HOVER); }
|
bool isHover() const { return HasAuraType(SPELL_AURA_HOVER); }
|
||||||
|
|
||||||
|
int32 ApplyEffectModifiers(SpellEntry const* spellProto, uint8 effect_index, int32 value);
|
||||||
int32 CalculateSpellDamage(SpellEntry const* spellProto, uint8 effect_index, int32 basePoints, Unit const* target);
|
int32 CalculateSpellDamage(SpellEntry const* spellProto, uint8 effect_index, int32 basePoints, Unit const* target);
|
||||||
int32 CalcSpellDuration(SpellEntry const* spellProto);
|
int32 CalcSpellDuration(SpellEntry const* spellProto);
|
||||||
int32 ModSpellDuration(SpellEntry const* spellProto, Unit const* target, int32 duration, bool positive);
|
int32 ModSpellDuration(SpellEntry const* spellProto, Unit const* target, int32 duration, bool positive);
|
||||||
|
|||||||
Reference in New Issue
Block a user