From 84bb5022f5bec20c34940a09ba25054625130afb Mon Sep 17 00:00:00 2001 From: megamage Date: Tue, 18 Aug 2009 09:18:32 -0500 Subject: [PATCH] *Fix a crash when creature release charmed unit. Thanks to Visagalis. --HG-- branch : trunk --- src/game/Unit.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 64fdc7d845..897db20e48 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -8562,7 +8562,9 @@ void Unit::SetMinion(Minion *minion, bool apply) //Check if there is another minion 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; //assert((*itr)->GetOwnerGUID() == GetGUID());