fix(Core): Correct packet structure for combat stop messages. (#19434)
* Init. * Reviewed changes.
This commit is contained in:
@@ -3051,10 +3051,12 @@ void Unit::SendMeleeAttackStop(Unit* victim)
|
|||||||
|
|
||||||
WorldPacket data(SMSG_ATTACKSTOP, (8 + 8 + 4));
|
WorldPacket data(SMSG_ATTACKSTOP, (8 + 8 + 4));
|
||||||
data << GetPackGUID();
|
data << GetPackGUID();
|
||||||
|
|
||||||
if (victim)
|
if (victim)
|
||||||
{
|
{
|
||||||
|
uint8 nowDead = victim->isDead();
|
||||||
data << victim->GetPackGUID();
|
data << victim->GetPackGUID();
|
||||||
data << victim->isDead();
|
data << nowDead;
|
||||||
}
|
}
|
||||||
SendMessageToSet(&data, true);
|
SendMessageToSet(&data, true);
|
||||||
LOG_DEBUG("entities.unit", "WORLD: Sent SMSG_ATTACKSTOP");
|
LOG_DEBUG("entities.unit", "WORLD: Sent SMSG_ATTACKSTOP");
|
||||||
|
|||||||
@@ -86,10 +86,12 @@ void WorldSession::SendAttackStop(Unit const* enemy)
|
|||||||
{
|
{
|
||||||
WorldPacket data(SMSG_ATTACKSTOP, (8 + 8 + 4)); // we guess size
|
WorldPacket data(SMSG_ATTACKSTOP, (8 + 8 + 4)); // we guess size
|
||||||
data << GetPlayer()->GetPackGUID();
|
data << GetPlayer()->GetPackGUID();
|
||||||
|
|
||||||
if (enemy)
|
if (enemy)
|
||||||
{
|
{
|
||||||
|
uint8 nowDead = enemy->isDead();
|
||||||
data << enemy->GetPackGUID(); // must be packed guid
|
data << enemy->GetPackGUID(); // must be packed guid
|
||||||
data << enemy->isDead();
|
data << nowDead;
|
||||||
}
|
}
|
||||||
SendPacket(&data);
|
SendPacket(&data);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user