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

--HG--
branch : trunk
This commit is contained in:
Shocker committed 2010-08-24 07:19:29 +03:00
1 parent fcebd3117a
commit 5e92a8e55a
5 files changed
+15 -3

No files matched your search

+5 -1
View File
@@ -11727,7 +11727,7 @@ float Unit::GetPPMProcChance(uint32 WeaponSpeed, float PPM, const SpellEntry * s
return floor((WeaponSpeed * PPM) / 600.0f); // result is chance in percents (probability = Speed_in_sec * (PPM / 60))
}
void Unit::Mount(uint32 mount, uint32 VehicleId)
void Unit::Mount(uint32 mount, uint32 VehicleId, uint32 creatureEntry)
{
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_MOUNT);
@@ -11759,6 +11759,10 @@ void Unit::Mount(uint32 mount, uint32 VehicleId)
{
GetVehicleKit()->Reset();
// mounts can also have accessories
GetVehicleKit()->GetBase()->SetEntry(creatureEntry); // set creature entry so InstallAllAccessories() can read correct accessories
GetVehicleKit()->InstallAllAccessories();
// Send others that we now have a vehicle
WorldPacket data(SMSG_PLAYER_VEHICLE_DATA, GetPackGUID().size()+4);
data.appendPackGUID(GetGUID());