aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp5
1 files changed, 3 insertions, 2 deletions
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);
}
}