aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-06-19 11:19:23 -0500
committermegamage <none@none>2009-06-19 11:19:23 -0500
commit15a753351cecac54ed6f7d4dd43c9b7074eaa069 (patch)
tree82ade1a023865cf4b6664650b9d5802391f9960d /src/game/Unit.cpp
parentb86ef4c3a8cf46eba6b1f259e0dfc98c0cdd918d (diff)
*Fix or add debug message for crash caused by controlled creatures
--HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index b1946870a26..53b3d8cf569 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -8935,8 +8935,10 @@ void Unit::RemoveAllControlled()
sLog.outError("Unit %u is trying to release unit %u which is neither charmed nor owned by it", GetEntry(), target->GetEntry());
}
}
- if(GetPetGUID() != GetMinionGUID())
- sLog.outCrash("Unit %u is not able to release its summon " I64FMT, GetEntry(), GetMinionGUID());
+ if(GetPetGUID())
+ sLog.outCrash("Unit %u is not able to release its pet " I64FMT, GetEntry(), GetPetGUID());
+ if(GetMinionGUID())
+ sLog.outCrash("Unit %u is not able to release its minion " I64FMT, GetEntry(), GetMinionGUID());
if(GetCharmGUID())
sLog.outCrash("Unit %u is not able to release its charm " I64FMT, GetEntry(), GetCharmGUID());
}
@@ -12054,12 +12056,13 @@ void Unit::RemoveFromWorld()
if(IsInWorld())
{
- UnsummonAllTotems();
- RemoveAllControlled();
RemoveCharmAuras();
RemoveBindSightAuras();
RemoveNotOwnSingleTargetAuras();
+
ExitVehicle();
+ UnsummonAllTotems();
+ RemoveAllControlled();
if(m_NotifyListPos >= 0)
{