*Fix a crash caused by summon_type_possess.

--HG--
branch : trunk
This commit is contained in:
megamage committed 2009-02-19 18:30:03 -06:00
1 parent 1ab0521ebf
commit eb3abf2556
8 files changed
+92 -57

No files matched your search

+4
View File
@@ -12971,6 +12971,10 @@ void Unit::SetCharmedOrPossessedBy(Unit* charmer, bool possess)
if(GetTypeId() == TYPEID_PLAYER)
((Player*)this)->StopCastingCharm();
// StopCastingCharm may remove a possessed pet?
if(!IsInWorld())
return;
// Set charmed
charmer->SetCharm(this);
SetCharmerGUID(charmer->GetGUID());