aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/GameObject.cpp2
-rw-r--r--src/game/SpellEffects.cpp18
2 files changed, 17 insertions, 3 deletions
diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp
index 75a1f9be985..f6f89f482e5 100644
--- a/src/game/GameObject.cpp
+++ b/src/game/GameObject.cpp
@@ -1280,7 +1280,7 @@ void GameObject::CastSpell(Unit* target, uint32 spell)
else
{
trigger->setFaction(14);
- trigger->CastSpell(target, spell, true);
+ trigger->CastSpell(target, spell, true, 0, 0, target->GetGUID());
}
//trigger->setDeathState(JUST_DIED);
//trigger->RemoveCorpse();
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);