From 0a3057972c78196621196cc68e785ed6d81e75c1 Mon Sep 17 00:00:00 2001 From: megamage Date: Fri, 24 Oct 2008 17:37:40 -0500 Subject: [svn] Fix a crash caused by gruul script. Change in EffectSummonWild and DoZoneInCombat. --HG-- branch : trunk --- src/game/SpellEffects.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/game/SpellEffects.cpp') diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 2807b2602ee..ed27c42eeee 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -3489,9 +3489,12 @@ void Spell::EffectSummonWild(uint32 i) int32 duration = GetSpellDuration(m_spellInfo); - TempSummonType summonType = (duration == 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_OR_DEAD_DESPAWN; + TempSummonType summonType = (duration == 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_DESPAWN; - m_caster->SummonCreature(creature_entry,px,py,pz,m_caster->GetOrientation(),summonType,duration); + if(m_originalCaster) + m_originalCaster->SummonCreature(creature_entry,px,py,pz,m_caster->GetOrientation(),summonType,duration); + else + m_caster->SummonCreature(creature_entry,px,py,pz,m_caster->GetOrientation(),summonType,duration); } } -- cgit v1.2.3