*Fix the bug that all vehicles are broken.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-21 14:05:54 -05:00
parent e20e65ced9
commit 297498f1f7
6 changed files with 9 additions and 15 deletions
+2 -2
View File
@@ -16569,6 +16569,8 @@ void Player::RemovePet(Pet* pet, PetSaveMode mode, bool returnreagent)
void Player::StopCastingCharm()
{
ExitVehicle();
Unit* charm = GetCharm();
if(!charm)
return;
@@ -16577,8 +16579,6 @@ void Player::StopCastingCharm()
{
if(((Creature*)charm)->isPet() && ((Pet*)charm)->getPetType() == POSSESSED_PET)
((Pet*)charm)->Remove(PET_SAVE_AS_DELETED);
else if(((Creature*)charm)->isVehicle())
((Vehicle*)charm)->RemovePassenger(this);
}
if(GetCharmGUID())
{