[8219] Avoid hunter traps proccing when deleted at replace by another trap.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
nos4r2zod 2009-07-20 12:34:54 +04:00 committed by VladimirMangos
parent 36605805b4
commit a6b1334ba1
2 changed files with 4 additions and 8 deletions

View file

@ -5749,14 +5749,10 @@ void Spell::EffectSummonObject(uint32 i)
default: return; default: return;
} }
uint64 guid = m_caster->m_ObjectSlot[slot]; if(uint64 guid = m_caster->m_ObjectSlot[slot])
if(guid != 0)
{ {
GameObject* obj = NULL; if(GameObject* obj = m_caster ? m_caster->GetMap()->GetGameObject(guid) : NULL)
if( m_caster ) obj->SetLootState(GO_JUST_DEACTIVATED);
obj = m_caster->GetMap()->GetGameObject(guid);
if(obj) obj->Delete();
m_caster->m_ObjectSlot[slot] = 0; m_caster->m_ObjectSlot[slot] = 0;
} }

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "8218" #define REVISION_NR "8219"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__