Jump to content

Recommended Posts

Posted

What bug does the patch fix? What features does the patch add?

This fixes the bug that some hunter traps can proc on their owners when a second trap is summoned.

For which repository revision was the patch created?

8183

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

http://getmangos.eu/community/viewtopic.php?id=8961

Who has been writing this patch? Please include either forum user names or email addresses.

Myself

Using an obj->Delete causes the object to lose its OwnerGUID too early (prior to 8102, the Delete wasn't calling CleanupsBeforeDelete). So instead, the obsolete trap should just be set to GO_JUST_DEACTIVATED and be cleaned up after it finishes the next update procedure call.

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index d0843e6..151968b 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -5677,7 +5677,7 @@ void Spell::EffectSummonObject(uint32 i)
        if( m_caster )
            obj = m_caster->GetMap()->GetGameObject(guid);

-        if(obj) obj->Delete();
+        if(obj) obj->SetLootState(GO_JUST_DEACTIVATED);
        m_caster->m_ObjectSlot[slot] = 0;
    }

  • 39 years later...
Posted

Still getting this problem after [8205] ( Really use trap GO charges and avoid casting in despawned state. ) But I won't go so far to say that is the best way to take care of this bug.

Edit: Perhaps GameObject:: Delete() needs to SetLootState(GO_JUST_DEACTIVATED) instead of having it in the SpellEffect?

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use