mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +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();
|
||||
|
||||
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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue