mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[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 <apoc@nymfe.net>
This commit is contained in:
parent
c96f8e3d9f
commit
2b09bb19eb
2 changed files with 3 additions and 3 deletions
|
|
@ -165,13 +165,13 @@ void TemporarySummon::UnSummon()
|
||||||
{
|
{
|
||||||
CombatStop();
|
CombatStop();
|
||||||
|
|
||||||
AddObjectToRemoveList();
|
|
||||||
|
|
||||||
Unit* sum = m_summoner ? ObjectAccessor::GetUnit(*this, m_summoner) : NULL;
|
Unit* sum = m_summoner ? ObjectAccessor::GetUnit(*this, m_summoner) : NULL;
|
||||||
if (sum && sum->GetTypeId() == TYPEID_UNIT && ((Creature*)sum)->AI())
|
if (sum && sum->GetTypeId() == TYPEID_UNIT && ((Creature*)sum)->AI())
|
||||||
{
|
{
|
||||||
((Creature*)sum)->AI()->SummonedCreatureDespawn(this);
|
((Creature*)sum)->AI()->SummonedCreatureDespawn(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AddObjectToRemoveList();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TemporarySummon::SaveToDB()
|
void TemporarySummon::SaveToDB()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8176"
|
#define REVISION_NR "8177"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue