aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellEffects.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-07-30 10:17:13 +0800
committermegamage <none@none>2009-07-30 10:17:13 +0800
commit3f32028e8251ef8b2235a3ec63c2d7e95d438649 (patch)
treeed9283d0e54e1468db92f8f5dc61cae91c9d5a18 /src/game/SpellEffects.cpp
parent9bd41d0255ba4b1a0bc217786e1bb4f3234a34ed (diff)
[8219] Avoid hunter traps proccing when deleted at replace by another trap. Author: nos4r2zod
--HG-- branch : trunk
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r--src/game/SpellEffects.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 7523664c8b1..89845a51bd0 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -5873,20 +5873,10 @@ void Spell::EffectSummonObject(uint32 i)
default: return;
}
- uint64 guid = m_caster->m_ObjectSlot[slot];
- if(guid != 0)
+ if(uint64 guid = m_caster->m_ObjectSlot[slot])
{
- 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);
- }
+ if(GameObject* obj = m_caster ? m_caster->GetMap()->GetGameObject(guid) : NULL)
+ obj->SetLootState(GO_JUST_DEACTIVATED);
m_caster->m_ObjectSlot[slot] = 0;
}