mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
send SMSG_PARTYKILLLOG when player kills an unit. by balrok
--HG-- branch : trunk
This commit is contained in:
@@ -14109,6 +14109,14 @@ void Unit::Kill(Unit *pVictim, bool durabilityLoss)
|
||||
|
||||
if (player->RewardPlayerAndGroupAtKill(pVictim))
|
||||
player->ProcDamageAndSpell(pVictim, PROC_FLAG_KILL, PROC_FLAG_KILLED, PROC_EX_NONE, 0);
|
||||
|
||||
WorldPacket data(SMSG_PARTYKILLLOG, (8+8)); //send event PARTY_KILL
|
||||
data << uint64(player->GetGUID()); //player with killing blow
|
||||
data << uint64(pVictim->GetGUID()); //victim
|
||||
if (Group *group = player->GetGroup())
|
||||
group->BroadcastPacket(&data, group->GetMemberGroup(player->GetGUID()));
|
||||
else
|
||||
player->SendDirectMessage(&data);
|
||||
else
|
||||
player->ProcDamageAndSpell(pVictim, PROC_FLAG_NONE, PROC_FLAG_KILLED, PROC_EX_NONE, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user