*Fix a crash when creature release charmed unit. Thanks to Visagalis.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-18 09:18:32 -05:00
parent d549ed1f8a
commit 84bb5022f5
+3 -1
View File
@@ -8562,7 +8562,9 @@ void Unit::SetMinion(Minion *minion, bool apply)
//Check if there is another minion //Check if there is another minion
for(ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr) for(ControlList::iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
{ {
if(GetCharmGUID() == (*itr)->GetGUID()) // do not use this check, creature do not have charm guid
//if(GetCharmGUID() == (*itr)->GetGUID())
if(GetGUID() == (*itr)->GetCharmerGUID())
continue; continue;
//assert((*itr)->GetOwnerGUID() == GetGUID()); //assert((*itr)->GetOwnerGUID() == GetGUID());