mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[9920] Restore group rewarding at player kill.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
bfffc715e5
commit
e5dc7a098c
2 changed files with 8 additions and 1 deletions
|
|
@ -673,6 +673,7 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
|
|||
// find owner of pVictim, used for creature cases, AI calls
|
||||
Unit* pOwner = pVictim->GetCharmerOrOwner();
|
||||
|
||||
// in creature kill case group/player tap stored for creature
|
||||
if (pVictim->GetTypeId() == TYPEID_UNIT)
|
||||
{
|
||||
group_tap = ((Creature*)pVictim)->GetGroupLootRecipient();
|
||||
|
|
@ -680,6 +681,12 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
|
|||
if (Player* recipient = ((Creature*)pVictim)->GetOriginalLootRecipient())
|
||||
player_tap = recipient;
|
||||
}
|
||||
// in player kill case group tap selected by player_tap (killer-player itself, or charmer, or owner, etc)
|
||||
else
|
||||
{
|
||||
if (player_tap)
|
||||
group_tap = player_tap->GetGroup();
|
||||
}
|
||||
|
||||
if (pVictim->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue