aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorQAston <none@none>2009-07-30 11:52:49 +0200
committerQAston <none@none>2009-07-30 11:52:49 +0200
commit8c6b85ccb1e7374a36e1d0afd6e3977dc9dc1887 (patch)
tree31d050be3fc9e986eb28e387683194f4b4093a09 /src
parent2a402ff6c776734f54db44662d34813e95b11c02 (diff)
parent33efe96f946c3a8e9473f399abf42d2245bc0097 (diff)
*Merge required after backout.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellEffects.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 592145354d5..724c57c48b6 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -5874,10 +5874,20 @@ void Spell::EffectSummonObject(uint32 i)
default: return;
}
- if(uint64 guid = m_caster->m_ObjectSlot[slot])
+ uint64 guid = m_caster->m_ObjectSlot[slot];
+ if(guid != 0)
{
- if(GameObject* obj = m_caster ? m_caster->GetMap()->GetGameObject(guid) : NULL)
- obj->SetLootState(GO_JUST_DEACTIVATED);
+ GameObject* obj = NULL;
+ if( m_caster )
+ obj = m_caster->GetMap()->GetGameObject(guid);
+
+ if(obj)
+ {
+ // Recast case - null spell id to make auras not be removed on object remove from world
+ if (m_spellInfo->Id == obj->GetSpellId())
+ obj->SetSpellId(0);
+ m_caster->RemoveGameObject(obj, true);
+ }
m_caster->m_ObjectSlot[slot] = 0;
}