diff options
author | megamage <none@none> | 2008-11-16 16:56:35 -0600 |
---|---|---|
committer | megamage <none@none> | 2008-11-16 16:56:35 -0600 |
commit | 9bcb0119e99dcda295db70106c56a51f26fd53fc (patch) | |
tree | efad01ff7d8bd262b12ff56397d60a1c8e9b95ca /src/game/SpellEffects.cpp | |
parent | a32d417cf00ab527f8bfc255c6b2399e855d582d (diff) |
*Fix Gruul's shatter effect damage. Patch provided by _krz.
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r-- | src/game/SpellEffects.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index f32a89db2b4..2c663e90212 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -333,13 +333,26 @@ void Spell::EffectSchoolDMG(uint32 effect_idx) damage = 200; break; } - // must only affect demons + // must only affect demons (also undead?) case 45072: { - if(unitTarget->GetCreatureType() != CREATURE_TYPE_DEMON) + if(unitTarget->GetCreatureType() != CREATURE_TYPE_DEMON + || unitTarget->GetCreatureType() != CREATURE_TYPE_UNDEAD) return; break; } + // gruul's shatter
+ case 33671:
+ {
+ // don't damage self and only players
+ if(unitTarget->GetGUID() == m_caster->GetGUID() || unitTarget->GetTypeId() != TYPEID_PLAYER)
+ return;
+
+ float radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[0]));
+ if(!radius) return;
+ float distance = m_caster->GetDistance2d(unitTarget);
+ damage = (distance > radius ) ? 0 : (int32)(m_spellInfo->EffectBasePoints[0]*((radius - distance)/radius));
+ }break; } break; } @@ -2637,6 +2650,7 @@ void Spell::EffectPersistentAA(uint32 i) { float radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i])); Unit *caster = m_originalCasterGUID ? m_originalCaster : m_caster; + if(!caster) return; if(Player* modOwner = caster->GetSpellModOwner()) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RADIUS, radius); |