From 2b09bb19eb2244bf9647ea2dc75c89bc482056f4 Mon Sep 17 00:00:00 2001 From: ApoC Date: Mon, 13 Jul 2009 22:11:32 +0200 Subject: [PATCH] [8177] Fixed calling SummonedCreatureDespawn from TemporarySummon::UnSummon * If we call AddObjectToRemoveList m_inWorld is set to false and ObjectAccessor::GetUnit always returns NULL. Signed-off-by: ApoC --- src/game/TemporarySummon.cpp | 4 ++-- src/shared/revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/TemporarySummon.cpp b/src/game/TemporarySummon.cpp index 1ba714d63..a93bdd925 100644 --- a/src/game/TemporarySummon.cpp +++ b/src/game/TemporarySummon.cpp @@ -165,13 +165,13 @@ void TemporarySummon::UnSummon() { CombatStop(); - AddObjectToRemoveList(); - Unit* sum = m_summoner ? ObjectAccessor::GetUnit(*this, m_summoner) : NULL; if (sum && sum->GetTypeId() == TYPEID_UNIT && ((Creature*)sum)->AI()) { ((Creature*)sum)->AI()->SummonedCreatureDespawn(this); } + + AddObjectToRemoveList(); } void TemporarySummon::SaveToDB() diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index cbfecdffa..64f174a44 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8176" + #define REVISION_NR "8177" #endif // __REVISION_NR_H__