diff options
author | megamage <none@none> | 2009-03-31 09:18:39 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-31 09:18:39 -0600 |
commit | 031df598ab444ae4ed3d3d66996168d3577fb29d (patch) | |
tree | b85408862f7001e8dc43447bc74bd77ce817e93e /src/game/TemporarySummon.cpp | |
parent | be89c6bb2a6a2c5f1a62e2010a9ee97efb8529b2 (diff) |
*Try to fix crash.
--HG--
branch : trunk
Diffstat (limited to 'src/game/TemporarySummon.cpp')
-rw-r--r-- | src/game/TemporarySummon.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/game/TemporarySummon.cpp b/src/game/TemporarySummon.cpp index fde2f4d7d84..4ae2c86b96a 100644 --- a/src/game/TemporarySummon.cpp +++ b/src/game/TemporarySummon.cpp @@ -174,8 +174,6 @@ void TempSummon::InitSummon(uint32 duration) if(m_type == TEMPSUMMON_MANUAL_DESPAWN) m_type = (duration == 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_DESPAWN; - AIM_Initialize(); - if(!m_Properties) return; @@ -194,6 +192,18 @@ void TempSummon::InitSummon(uint32 duration) } } + if(owner) + { + if(owner->GetTypeId()==TYPEID_UNIT && ((Creature*)owner)->IsAIEnabled) + ((Creature*)owner)->AI()->JustSummoned(this); + + if(GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_TRIGGER && m_spells[0]) + { + setFaction(owner->getFaction()); + CastSpell(this, m_spells[0], false, 0, 0, m_summonerGUID); + } + } + if(m_Properties->Faction) setFaction(m_Properties->Faction); } |