Core/Units: Some cleanup in movement packet related functions - try to keep only one function handling a packet, not have it scattered all over the place
This commit is contained in:
1 parent
e9e1fb1025
commit
075e5d6751
8 files changed
+50
-54
No files matched your search
@@ -11966,11 +11966,7 @@ void Unit::Mount(uint32 mount, uint32 VehicleId, uint32 creatureEntry)
|
||||
player->UnsummonPetTemporaryIfAny();
|
||||
}
|
||||
|
||||
WorldPacket data(SMSG_MOVE_SET_COLLISION_HEIGHT, GetPackGUID().size() + 4 + 4);
|
||||
data.append(GetPackGUID());
|
||||
data << uint32(sWorld->GetGameTime()); // Packet counter
|
||||
data << player->GetCollisionHeight(true);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendMovementSetCollisionHeight(player->GetCollisionHeight(true));
|
||||
}
|
||||
|
||||
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_MOUNT);
|
||||
@@ -11984,14 +11980,8 @@ void Unit::Dismount()
|
||||
SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, 0);
|
||||
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_MOUNT);
|
||||
|
||||
/*if (Player* thisPlayer = ToPlayer())
|
||||
{
|
||||
WorldPacket data(SMSG_MOVE_SET_COLLISION_HEIGHT, GetPackGUID().size() + 4 + 4);
|
||||
data.append(GetPackGUID());
|
||||
data << uint32(sWorld->GetGameTime()); // Packet counter
|
||||
data << thisPlayer->GetCollisionHeight(false);
|
||||
thisPlayer->GetSession()->SendPacket(&data);
|
||||
}*/
|
||||
if (Player* thisPlayer = ToPlayer())
|
||||
thisPlayer->SendMovementSetCollisionHeight(thisPlayer->GetCollisionHeight(false));
|
||||
|
||||
WorldPacket data(SMSG_DISMOUNT, 8);
|
||||
data.appendPackGUID(GetGUID());
|
||||
|
||||
Reference in new issue
Block a user