Core/Units: Second part of SMSG_MOVE_SET_COLLISION_HGT implementation: compute proper collision height according to client formulae and send this to the client when mounting up.

This commit is contained in:
Machiavelli committed 2011-11-22 20:28:10 +01:00
1 parent 99ad58233b
commit 8444532746
4 files changed
+39 -12

No files matched your search

+7 -1
View File
@@ -11934,6 +11934,12 @@ void Unit::Mount(uint32 mount, uint32 VehicleId, uint32 creatureEntry)
else
player->UnsummonPetTemporaryIfAny();
}
WorldPacket data(SMSG_MOVE_SET_COLLISION_HGT, GetPackGUID().size() + 4 + 4);
data.append(GetPackGUID());
data << uint32(sWorld->GetGameTime()); // Packet counter
data << player->GetCollisionHeight(true);
player->GetSession()->SendPacket(&data);
}
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_MOUNT);
@@ -11952,7 +11958,7 @@ void Unit::Unmount()
WorldPacket data(SMSG_MOVE_SET_COLLISION_HGT, GetPackGUID().size() + 4 + 4);
data.append(GetPackGUID());
data << uint32(sWorld->GetGameTime()); // Packet counter
data << thisPlayer->GetCollisionHeight();
data << thisPlayer->GetCollisionHeight(false);
thisPlayer->GetSession()->SendPacket(&data);
}