mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[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:
parent
5b0e73e36e
commit
96b317eea4
3 changed files with 12 additions and 18 deletions
|
|
@ -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,19 +6124,16 @@ 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)
|
||||
{
|
||||
AuraList const& mModDamagePercentDone = GetAurasByType(SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
|
||||
for(AuraList::const_iterator i = mModDamagePercentDone.begin(); i != mModDamagePercentDone.end(); ++i)
|
||||
if( ((*i)->GetModifier()->m_miscvalue & GetSpellSchoolMask(spellProto)) &&
|
||||
(*i)->GetSpellProto()->EquippedItemClass == -1 &&
|
||||
// -1 == any item class (not wand then)
|
||||
(*i)->GetSpellProto()->EquippedItemInventoryTypeMask == 0 )
|
||||
// 0 == any inventory type (not wand then)
|
||||
{
|
||||
if( ((*i)->GetModifier()->m_miscvalue & GetSpellSchoolMask(spellProto)) &&
|
||||
(*i)->GetSpellProto()->EquippedItemClass == -1 &&
|
||||
// -1 == any item class (not wand then)
|
||||
(*i)->GetSpellProto()->EquippedItemInventoryTypeMask == 0 )
|
||||
// 0 == any inventory type (not wand then)
|
||||
{
|
||||
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
|
||||
}
|
||||
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue