Fix accessories for vehicle player mounts (the vendors on Traveler's Tundra Mammoth for example)

--HG--
branch : trunk
This commit is contained in:
Shocker
2010-08-24 07:19:29 +03:00
parent fcebd3117a
commit 5e92a8e55a
5 changed files with 15 additions and 3 deletions
@@ -659,6 +659,11 @@ void WorldSession::HandleEjectPasenger(WorldPacket &data)
data >> guid;
if (Player* Pl=ObjectAccessor::FindPlayer(guid))
Pl->ExitVehicle();
else if (Unit* Un = ObjectAccessor::GetUnit(*_player, guid)) // creatures can be ejected too from player mounts
{
Un->ExitVehicle();
Un->ToCreature()->ForcedDespawn(1000);
}
}
}
}