aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp18
-rwxr-xr-xsrc/server/game/Miscellaneous/SharedDefines.h4
-rwxr-xr-xsrc/server/game/Spells/SpellMgr.cpp5
3 files changed, 11 insertions, 16 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index f70bdd3b262..f6db458e270 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -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())
diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h
index a65eaaa556d..54b336345a2 100755
--- a/src/server/game/Miscellaneous/SharedDefines.h
+++ b/src/server/game/Miscellaneous/SharedDefines.h
@@ -415,7 +415,7 @@ enum SpellAttr4
SPELL_ATTR4_UNK5 = 0x00000020, // 5
SPELL_ATTR4_NOT_STEALABLE = 0x00000040, // 6 although such auras might be dispellable, they cannot be stolen
SPELL_ATTR4_TRIGGERED = 0x00000080, // 7 spells forced to be triggered
- SPELL_ATTR4_FIXED_DAMAGE = 0x00000100, // 8 decimate, share damage?
+ SPELL_ATTR4_UNK8 = 0x00000100, // 8 ignores taken percent damage mods?
SPELL_ATTR4_UNK9 = 0x00000200, // 9
SPELL_ATTR4_SPELL_VS_EXTEND_COST = 0x00000400, // 10 Rogue Shiv have this flag
SPELL_ATTR4_UNK11 = 0x00000800, // 11
@@ -508,7 +508,7 @@ enum SpellAttr6
SPELL_ATTR6_UNK26 = 0x04000000, // 26
SPELL_ATTR6_UNK27 = 0x08000000, // 27
SPELL_ATTR6_UNK28 = 0x10000000, // 28
- SPELL_ATTR6_UNK29 = 0x20000000, // 29
+ SPELL_ATTR6_NO_DONE_PCT_DAMAGE_MODS = 0x20000000, // 29 ignores done percent damage mods?
SPELL_ATTR6_UNK30 = 0x40000000, // 30
SPELL_ATTR6_UNK31 = 0x80000000 // 31
};
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 81ad953bc0f..61d9478760a 100755
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -3942,11 +3942,6 @@ void SpellMgr::LoadSpellCustomAttr()
spellInfo->AttributesEx3 |= SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED;
++count;
break;
- case 31117: // Unstable Affliction
- // this attribute currently makes spell to ignore resilience and absorbs
- spellInfo->AttributesEx4 &= ~SPELL_ATTR4_FIXED_DAMAGE;
- ++count;
- break;
case 16007: // Draco-Incarcinatrix 900
// was 46, but effect is aura effect
spellInfo->EffectImplicitTargetA[0] = TARGET_UNIT_NEARBY_ENTRY;