diff options
Diffstat (limited to 'src/game/SpellAuras.cpp')
| -rw-r--r-- | src/game/SpellAuras.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index e586061a61f..6952b9d7859 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -6735,11 +6735,15 @@ void AuraEffect::HandleModPossessPet(bool apply, bool Real, bool /*changeAmount* if(!caster || caster->GetTypeId() != TYPEID_PLAYER) return; - if(((Player*)caster)->GetPet() != m_target) - return; + //seems it may happen that when removing it is no longer owner's pet + //if(((Player*)caster)->GetPet() != m_target) + // return; if(apply) { + if(((Player*)caster)->GetPet() != m_target) + return; + m_target->SetCharmedBy(caster, CHARM_TYPE_POSSESS); } else @@ -6751,8 +6755,8 @@ void AuraEffect::HandleModPossessPet(bool apply, bool Real, bool /*changeAmount* if(!m_target->getVictim()) { m_target->GetMotionMaster()->MoveFollow(caster, PET_FOLLOW_DIST, m_target->GetFollowAngle()); - if(m_target->GetCharmInfo()) - m_target->GetCharmInfo()->SetCommandState(COMMAND_FOLLOW); + //if(m_target->GetCharmInfo()) + // m_target->GetCharmInfo()->SetCommandState(COMMAND_FOLLOW); } } } |
