Jump to content

[fix][6029] Tempsummon_timed_or_dead_despawn


Auntie Mangos

Recommended Posts

  • 38 years later...

Revision: 5960

Written by: Seline

Description: If a creature that was temporarily summoned using TEMPSUMMON_TIMED_OR_DEAD_DESPAWN was killed, it would despawn by whichever was the faster timer: the timer that sets the creature's death state to DEAD (which is based on config values as of a few revisions ago when corpse decay was properly implemented), or if the unsummon timer ran out, as it only checks if the creature is not in combat, regardless of whether it's dead or alive. This caused issues where a boss (for example) was temporarily summoned with an unsummon timer of 120000, but the config values for boss corpse decay is set to something much higher. When the boss dies, the corpse would despawn when the 120000 ran out, instead of stopping that timer and waiting for the death state to be set to DEAD and THEN despawning it. I don't know if it's intentional or not, but it was quite annoying in some situations (details on demand). Anyway, it's a simple fix, just add an isAlive() check at the same place as the !isInCombat() check and the timer will only decrement if the creature is out of combat and alive, so the creature would properly despawn on death when its corpse decays.

Index: src/game/TemporarySummon.cpp
===================================================================
--- src/game/TemporarySummon.cpp        (revision 5960)
+++ src/game/TemporarySummon.cpp        (working copy)
@@ -129,7 +129,7 @@
                                return;
                        }

-                        if (!isInCombat())
+                        if (!isInCombat() && isAlive() )
                        {
                                if (m_timer <= diff)
                                {

Hope you understood and that this helps!

~Seline~

Link to comment
Share on other sites

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