aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/TemporarySummon.cpp8
-rw-r--r--src/game/Unit.cpp4
2 files changed, 8 insertions, 4 deletions
diff --git a/src/game/TemporarySummon.cpp b/src/game/TemporarySummon.cpp
index 8e04bc22c68..434750c8744 100644
--- a/src/game/TemporarySummon.cpp
+++ b/src/game/TemporarySummon.cpp
@@ -224,7 +224,13 @@ void TempSummon::SetTempSummonType(TempSummonType type)
void TempSummon::UnSummon()
{
- assert(!isPet());
+ //assert(!isPet());
+ if(isPet())
+ {
+ ((Pet*)this)->Remove(PET_SAVE_NOT_IN_SLOT);
+ assert(!IsInWorld());
+ return;
+ }
Unit* owner = GetSummoner();
if(owner && owner->GetTypeId() == TYPEID_UNIT && ((Creature*)owner)->IsAIEnabled)
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 0de06b9e9a9..74eda6482d0 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -9138,9 +9138,7 @@ void Unit::RemoveAllControlled()
&& target->GetTypeId() == TYPEID_UNIT
&& ((Creature*)target)->HasSummonMask(SUMMON_MASK_SUMMON))
{
-
- if(!((TempSummon*)target)->isPet())
- ((TempSummon*)target)->UnSummon();
+ ((TempSummon*)target)->UnSummon();
}
else
{