aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellEffects.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-21 22:48:52 -0600
committermegamage <none@none>2009-03-21 22:48:52 -0600
commit3c5a24f4cda9943482f9c325123d6532bfe9afb3 (patch)
treebda5e0fa286917c0180e84737744ac7f448e4a78 /src/game/SpellEffects.cpp
parentb522a34247b1a5c30d918c2f0debca74b1ff4cf9 (diff)
[7516] Add form/mounting/self control loss limitations to 48505 and ranks. Author: Sarjuuk
--HG-- branch : trunk
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r--src/game/SpellEffects.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 1d92b6aa6ec..66cc9f56d3e 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -1504,7 +1504,19 @@ void Spell::EffectDummy(uint32 i)
// Starfall
if (m_spellInfo->SpellFamilyFlags[2] & 0x100)
{
- m_caster->CastSpell(unitTarget, damage, true, NULL);
+ //Shapeshifting into an animal form or mounting cancels the effect.
+ if(m_caster->GetCreatureType() == CREATURE_TYPE_BEAST || m_caster->IsMounted())
+ {
+ if(m_triggeredByAuraSpell)
+ m_caster->RemoveAurasDueToSpell(m_triggeredByAuraSpell->Id);
+ return;
+ }
+
+ //Any effect which causes you to lose control of your character will supress the starfall effect.
+ if(m_caster->hasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_FLEEING | UNIT_STAT_ROOT | UNIT_STAT_CONFUSED))
+ return;
+
+ m_caster->CastSpell(unitTarget, damage, true);
return;
}
break;