[9920] Restore group rewarding at player kill.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
KillerFrca 2010-05-18 04:36:01 +04:00 committed by VladimirMangos
parent bfffc715e5
commit e5dc7a098c
2 changed files with 8 additions and 1 deletions

View file

@ -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)
{

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9919"
#define REVISION_NR "9920"
#endif // __REVISION_NR_H__