Core/Units: Partial implementation of SMSG_MOVE_SET_COLLISION_HGT - send proper character collision height on dismount.
Fixes #2642 NOTE: Still have to properly implement collision height calculation for mounting up.
This commit is contained in:
1 parent
7c8f4358ea
commit
a14cbcaa3e
6 files changed
+51
-2
No files matched your search
@@ -11946,6 +11946,15 @@ void Unit::Unmount()
|
||||
SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID, 0);
|
||||
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_MOUNT);
|
||||
|
||||
if (Player* thisPlayer = ToPlayer())
|
||||
{
|
||||
WorldPacket data(SMSG_MOVE_SET_COLLISION_HGT, GetPackGUID().size() + 4 + 4);
|
||||
data.append(GetPackGUID());
|
||||
data << uint32(sWorld->GetGameTime()); // Packet counter
|
||||
data << thisPlayer->GetCollisionHeight();
|
||||
thisPlayer->GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
WorldPacket data(SMSG_DISMOUNT, 8);
|
||||
data.appendPackGUID(GetGUID());
|
||||
SendMessageToSet(&data, true);
|
||||
|
||||
Reference in new issue
Block a user