mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-18 14:10:18 -04:00
Core/Spells: Define and implement SPELL_ATTR6_NO_DONE_PCT_DAMAGE_MODS; revert SPELL_ATTR4_FIXED_DAMAGE
Closes #1307 Closes #2270
This commit is contained in:
@@ -1032,12 +1032,6 @@ void Unit::CalculateSpellDamageTaken(SpellNonMeleeDamage *damageInfo, int32 dama
|
||||
if (damage < 0)
|
||||
return;
|
||||
|
||||
if (spellInfo->AttributesEx4 & SPELL_ATTR4_FIXED_DAMAGE)
|
||||
{
|
||||
damageInfo->damage = damage;
|
||||
return;
|
||||
}
|
||||
|
||||
Unit* victim = damageInfo->target;
|
||||
if (!victim || !victim->isAlive())
|
||||
return;
|
||||
@@ -10692,9 +10686,9 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellEntry const* spellProto, uint32
|
||||
AddPctN(DoneTotalMod, aurEff->GetAmount());
|
||||
|
||||
// Sigil of the Vengeful Heart
|
||||
if (spellProto->SpellFamilyFlags[0] & 0x2000)
|
||||
if (AuraEffect* aurEff = GetAuraEffect(64962, EFFECT_1))
|
||||
AddPctN(DoneTotal, aurEff->GetAmount());
|
||||
if (spellProto->SpellFamilyFlags[0] & 0x2000)
|
||||
if (AuraEffect* aurEff = GetAuraEffect(64962, EFFECT_1))
|
||||
AddPctN(DoneTotal, aurEff->GetAmount());
|
||||
|
||||
// Glacier Rot
|
||||
if (spellProto->SpellFamilyFlags[0] & 0x2 || spellProto->SpellFamilyFlags[1] & 0x6)
|
||||
@@ -10904,6 +10898,12 @@ uint32 Unit::SpellDamageBonus(Unit* victim, SpellEntry const* spellProto, uint32
|
||||
DoneTotalMod = 1.0f;
|
||||
}
|
||||
|
||||
// Some spells don't benefit from from pct done mods
|
||||
// maybe should be implemented like SPELL_ATTR3_NO_DONE_BONUS,
|
||||
// but then it may break spell power coeffs work on spell 31117
|
||||
if (spellProto->AttributesEx6 & SPELL_ATTR6_NO_DONE_PCT_DAMAGE_MODS)
|
||||
DoneTotalMod = 1.0f;
|
||||
|
||||
float tmpDamage = (int32(pdamage) + DoneTotal) * DoneTotalMod;
|
||||
// apply spellmod to Done damage (flat and pct)
|
||||
if (Player* modOwner = GetSpellModOwner())
|
||||
|
||||
Reference in New Issue
Block a user