*Fix a crash caused by summon_type_possess.
--HG-- branch : trunk
This commit is contained in:
1 parent
1ab0521ebf
commit
eb3abf2556
8 files changed
+92
-57
No files matched your search
@@ -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());
|
||||
|
||||
Reference in new issue
Block a user