[10531] Spells with SPELL_ATTR_EX6_NO_DMG_PERCENT_MODS must ignore all damage mods

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
nos4r2zod 2010-09-25 10:26:22 +04:00 committed by VladimirMangos
parent 5b0e73e36e
commit 96b317eea4
3 changed files with 12 additions and 18 deletions

View file

@ -449,7 +449,7 @@ const uint32 ItemQualityColors[MAX_ITEM_QUALITY] = {
#define SPELL_ATTR_EX6_UNK26 0x04000000 // 26 not set in 3.0.3
#define SPELL_ATTR_EX6_UNK27 0x08000000 // 27 not set in 3.0.3
#define SPELL_ATTR_EX6_UNK28 0x10000000 // 28 not set in 3.0.3
#define SPELL_ATTR_EX6_NO_DMG_PERCENT_MODS 0x20000000 // 29 do not apply damage percent mods (usually in cases where it has already been applied)
#define SPELL_ATTR_EX6_NO_DMG_MODS 0x20000000 // 29 do not apply damage mods (usually in cases where it has already been applied)
#define SPELL_ATTR_EX6_UNK30 0x40000000 // 30 not set in 3.0.3
#define SPELL_ATTR_EX6_UNK31 0x80000000 // 31 not set in 3.0.3

View file

@ -6107,7 +6107,7 @@ int32 Unit::SpellBonusWithCoeffs(SpellEntry const *spellProto, int32 total, int3
*/
uint32 Unit::SpellDamageBonusDone(Unit *pVictim, SpellEntry const *spellProto, uint32 pdamage, DamageEffectType damagetype, uint32 stack)
{
if(!spellProto || !pVictim || damagetype==DIRECT_DAMAGE )
if(!spellProto || !pVictim || damagetype==DIRECT_DAMAGE || spellProto->AttributesEx6 & SPELL_ATTR_EX6_NO_DMG_MODS)
return pdamage;
// For totems get damage bonus from owner (statue isn't totem in fact)
@ -6124,8 +6124,6 @@ uint32 Unit::SpellDamageBonusDone(Unit *pVictim, SpellEntry const *spellProto, u
if( GetTypeId() == TYPEID_UNIT && !((Creature*)this)->isPet() )
DoneTotalMod *= ((Creature*)this)->GetSpellDamageMod(((Creature*)this)->GetCreatureInfo()->rank);
if (!(spellProto->AttributesEx6 & SPELL_ATTR_EX6_NO_DMG_PERCENT_MODS))
{
AuraList const& mModDamagePercentDone = GetAurasByType(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
for(AuraList::const_iterator i = mModDamagePercentDone.begin(); i != mModDamagePercentDone.end(); ++i)
{
@ -6138,7 +6136,6 @@ uint32 Unit::SpellDamageBonusDone(Unit *pVictim, SpellEntry const *spellProto, u
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
}
}
}
uint32 creatureTypeMask = pVictim->GetCreatureTypeMask();
// Add flat bonus from spell damage versus
@ -7087,10 +7084,7 @@ bool Unit::IsDamageToThreatSpell(SpellEntry const * spellInfo) const
*/
uint32 Unit::MeleeDamageBonusDone(Unit *pVictim, uint32 pdamage,WeaponAttackType attType, SpellEntry const *spellProto, DamageEffectType damagetype, uint32 stack)
{
if (!pVictim)
return pdamage;
if (pdamage == 0)
if (!pVictim || pdamage == 0 || (spellProto && spellProto->AttributesEx6 & SPELL_ATTR_EX6_NO_DMG_MODS))
return pdamage;
// differentiate for weapon damage based spells

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10530"
#define REVISION_NR "10531"
#endif // __REVISION_NR_H__