mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
[8219] Avoid hunter traps proccing when deleted at replace by another trap. Author: nos4r2zod
--HG-- branch : trunk
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user