From d971d0121fafd23504bdfb151dffd0e33b1d7940 Mon Sep 17 00:00:00 2001 From: megamage Date: Mon, 25 May 2009 22:52:08 -0500 Subject: *Do not consider possessed creatures as pet. Also fix the bug that possessed creature does not display spells. --HG-- branch : trunk --- src/game/Unit.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/game/Unit.cpp') diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 9fce2306774..dc0dfb7d102 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -8341,7 +8341,7 @@ void Unit::SetMinion(Minion *minion, bool apply) } } - //if(minion->HasSummonMask(SUMMON_MASK_GUARDIAN)) + if(minion->HasSummonMask(SUMMON_MASK_GUARDIAN)) { if(AddUInt64Value(UNIT_FIELD_SUMMON, minion->GetGUID())) { @@ -8470,7 +8470,8 @@ void Unit::SetCharm(Unit* charm, bool apply) if(!charm->RemoveUInt64Value(UNIT_FIELD_CHARMEDBY, GetGUID())) sLog.outCrash("Unit %u is being uncharmed, but it has another charmer %u", charm->GetEntry(), charm->GetCharmerGUID()); - m_Controlled.erase(charm); + if(!charm->GetOwnerGUID() == GetGUID()) + m_Controlled.erase(charm); } } -- cgit v1.2.3