Core/Network: Optimized packet sending by removing unneccessary memory copying

This commit is contained in:
Shauren committed 2014-07-27 17:46:46 +02:00
1 parent 8a05231994
commit 6f272ea5b7
18 files changed
+162 -53

No files matched your search

+5 -1
View File
@@ -2223,7 +2223,11 @@ void Unit::SendMeleeAttackStop(Unit* victim)
{
WorldPacket data(SMSG_ATTACKSTOP, (8+8+4));
data.append(GetPackGUID());
data.append(victim ? victim->GetPackGUID() : 0);
if (victim)
data.append(victim->GetPackGUID());
else
data << uint8(0);
data << uint32(0); //! Can also take the value 0x01, which seems related to updating rotation
SendMessageToSet(&data, true);
TC_LOG_DEBUG("entities.unit", "WORLD: Sent SMSG_ATTACKSTOP");