diff options
author | megamage <none@none> | 2008-11-16 17:22:48 -0600 |
---|---|---|
committer | megamage <none@none> | 2008-11-16 17:22:48 -0600 |
commit | 2351a737b5d6aedb55b71a22a6dfbd2a47822198 (patch) | |
tree | e5cc7a19890b028d787d338dc0fc0722502d97e8 | |
parent | 4b6072f9c3ea8d97e711e4ef6e77822c3c2ef4ba (diff) | |
parent | 9bcb0119e99dcda295db70106c56a51f26fd53fc (diff) |
Merge 246 and 247.
--HG--
branch : trunk
-rw-r--r-- | src/game/GameObject.cpp | 2 | ||||
-rw-r--r-- | src/game/SpellEffects.cpp | 18 |
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); |