Core/Units: send object update before sending smsg_dismount to prevent the mount hitbox becoming huge

This commit is contained in:
Ovalord committed 2018-02-14 20:40:18 +01:00
1 parent 02fef5cbe2
commit 84d980742d
3 files changed
+24

No files matched your search

+5
View File
@@ -8043,6 +8043,7 @@ void Unit::Mount(uint32 mount, uint32 VehicleId, uint32 creatureEntry)
{
if (mount)
SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, mount);
SetObjectScale(GetObjectScale());
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_MOUNT);
@@ -8051,6 +8052,7 @@ void Unit::Mount(uint32 mount, uint32 VehicleId, uint32 creatureEntry)
// mount as a vehicle
if (VehicleId)
{
// mount as a vehicle
if (CreateVehicleKit(VehicleId, creatureEntry))
{
// Send others that we now have a vehicle
@@ -8098,7 +8100,10 @@ void Unit::Dismount()
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_MOUNT);
if (Player* thisPlayer = ToPlayer())
{
SendUpdateToSet();
thisPlayer->SendMovementSetCollisionHeight(thisPlayer->GetCollisionHeight(false));
}
WorldPacket data(SMSG_DISMOUNT, 8);
data << GetPackGUID();