[svn] * Disabled the move and stay commands while pet is possessed

* Make pet come back to its owner after possession ends if it's not currently in combat
* Allow the possessed unit to properly change attack targets
* Also remove charm effects from charmed target on owner aura cancel

--HG--
branch : trunk
This commit is contained in:
gvcoman
2008-11-08 23:32:15 -06:00
parent 35a284df7e
commit c014d6667c
4 changed files with 21 additions and 4 deletions

View File

@@ -352,13 +352,15 @@ void WorldSession::HandleCancelAuraOpcode( WorldPacket& recvPacket)
if (!spellInfo)
return;
// Remove possess aura from the possessed as well
if(_player->isPossessing())
// Remove possess/charm aura from the possessed/charmed as well
// TODO: Remove this once the ability to cancel aura sets at once is implemented
if(_player->GetCharm())
{
for (int i = 0; i < 3; ++i)
{
if (spellInfo->EffectApplyAuraName[i] == SPELL_AURA_MOD_POSSESS ||
spellInfo->EffectApplyAuraName[i] == SPELL_AURA_MOD_POSSESS_PET)
spellInfo->EffectApplyAuraName[i] == SPELL_AURA_MOD_POSSESS_PET ||
spellInfo->EffectApplyAuraName[i] == SPELL_AURA_MOD_CHARM)
{
_player->RemoveAurasDueToSpellByCancel(spellId);
_player->GetCharm()->RemoveAurasDueToSpellByCancel(spellId);