Jump to content

[Fix] Temporary Summon Respawn


pasdVn

Recommended Posts

Hi,

currently it is possible, that temporary summons are abled to respawn, if the left lifetime of the summon (TemporarySummon::m_timer) when the creature get's killed, is greater than Creature::m_deathTimer + 25s (default respawn time).

In this case Creature::Update will remove the corpse and respawn the summon.

From 10e25b27b930627be9ee40ceec923d02d69207ec Mon Sep 17 00:00:00 2001
From: pasdVn <[email protected]>
Date: Fri, 9 Apr 2010 11:21:54 +0200
Subject: [PATCH] Fixed respawn bug for temporary summons.

---
src/game/Creature.cpp        |    4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index b50d4aa..b0c193c 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -365,6 +365,10 @@ void Creature::Update(uint32 diff)
            break;
        case DEAD:
        {
+            // no respawn handling for temporary summons
+            if (isTemporarySummon())
+                break;
+
            if( m_respawnTime <= time(NULL) )
            {
                DEBUG_LOG("Respawning...");
-- 
1.6.5.1.1367.gcd48

Alternative fixes could be:

  • * always unsummon if m_deathState == DEAD (so if the corpse is removed). Imo you don't need any summon that is dead and without corpse anymore (as it should never respawn)
    * set m_respawnDelay to some days in the constructor of temporarySummon (or somewhere else), but I think that is crap
Link to comment
Share on other sites

  • 1 year later...

I reject this, because I think it is the wrong way;

Basicly we define how the temp-summon types should behave, and in my view the most reasonable would be to change them so that the respawnDelay is increased to a value bigger than the time given as last argument in most summon-type cases.

Would feel more reasonable to me, as example:

TEMPSUMMON_CORPSE_TIMED_DESPAWN 300s I would expect that the corpse will be visible for 300s (before despawn and unsummon)

Link to comment
Share on other sites

×
×
  • 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