aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-08-18 09:18:32 -0500
committermegamage <none@none>2009-08-18 09:18:32 -0500
commit84bb5022f5bec20c34940a09ba25054625130afb (patch)
treeb88dee87e5a2c49ab7dc18d329cd7ff4e86caae5 /src
parentd549ed1f8abc0855b2ad0431f5d92bc5c9e940b4 (diff)
*Fix a crash when creature release charmed unit. Thanks to Visagalis.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Unit.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 64fdc7d845d..897db20e48b 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());