aboutsummaryrefslogtreecommitdiff
path: root/src/game/Spell.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2008-12-13 00:46:43 -0600
committermegamage <none@none>2008-12-13 00:46:43 -0600
commit3533c094d24ff98fee74e458d6131dd3126e40af (patch)
tree854ecd6ddf9efafecfa0725e5aeeeb1a3b63b2bd /src/game/Spell.cpp
parentbe875bc6c0b070aa639acd5cf26435d20ddcf89c (diff)
*Update diminishing return table: sap and gouge have polymorph return, warlock's fear and seduction have fear return.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r--src/game/Spell.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 9f37bbb7333..b576661aede 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1223,11 +1223,14 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
}
// Get Data Needed for Diminishing Returns, some effects may have multiple auras, so this must be done on spell hit, not aura add
- m_diminishGroup = GetDiminishingReturnsGroupForSpell(m_spellInfo,m_triggeredByAuraSpell);
- m_diminishLevel = unit->GetDiminishing(m_diminishGroup);
- // Increase Diminishing on unit, current informations for actually casts will use values above
- if((GetDiminishingReturnsGroupType(m_diminishGroup) == DRTYPE_PLAYER && unit->GetTypeId() == TYPEID_PLAYER) || GetDiminishingReturnsGroupType(m_diminishGroup) == DRTYPE_ALL)
- unit->IncrDiminishing(m_diminishGroup);
+ if(m_diminishGroup = GetDiminishingReturnsGroupForSpell(m_spellInfo,m_triggeredByAuraSpell))
+ {
+ m_diminishLevel = unit->GetDiminishing(m_diminishGroup);
+ DiminishingReturnsType type = GetDiminishingReturnsGroupType(m_diminishGroup);
+ // Increase Diminishing on unit, current informations for actually casts will use values above
+ if((type == DRTYPE_PLAYER && unit->GetTypeId() == TYPEID_PLAYER) || type == DRTYPE_ALL)
+ unit->IncrDiminishing(m_diminishGroup);
+ }
for(uint32 effectNumber=0;effectNumber<3;effectNumber++)
{