*Cleanup of charm/farsight code. Hope this can fix some crash bugs.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-02-15 17:33:36 -06:00
parent 058b7c32e4
commit bb75ff7b79
10 changed files with 41 additions and 130 deletions

View File

@@ -153,12 +153,7 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
p->setDeathState(CORPSE);
}
else // charmed or possessed
{
if (_player->isPossessing())
_player->RemovePossess(true);
else
_player->Uncharm();
}
_player->Uncharm();
break;
default:
sLog.outError("WORLD: unknown PET flag Action %i and spellid %i.\n", flag, spellid);
@@ -495,12 +490,7 @@ void WorldSession::HandlePetAbandon( WorldPacket & recv_data )
_player->RemovePet((Pet*)pet,PET_SAVE_AS_DELETED);
}
else if(pet->GetGUID() == _player->GetCharmGUID())
{
if (_player->isPossessing())
_player->RemovePossess(true);
else
_player->Uncharm();
}
_player->Uncharm();
}
}