Fixed KILL proc to occur for the unit that lands the killing blow, not for the loot recipient.
--HG-- branch : trunk
This commit is contained in:
+9
-5
@@ -14585,13 +14585,17 @@ void Unit::Kill(Unit *pVictim, bool durabilityLoss)
|
||||
|
||||
loot->generateMoneyLoot(creature->GetCreatureInfo()->mingold,creature->GetCreatureInfo()->maxgold);
|
||||
}
|
||||
|
||||
if (player->RewardPlayerAndGroupAtKill(pVictim))
|
||||
player->ProcDamageAndSpell(pVictim, PROC_FLAG_KILL, PROC_FLAG_KILLED, PROC_EX_NONE, 0);
|
||||
else
|
||||
player->ProcDamageAndSpell(pVictim, PROC_FLAG_NONE, PROC_FLAG_KILLED, PROC_EX_NONE, 0);
|
||||
}
|
||||
|
||||
// Do KILL and KILLED procs. KILL proc is called only for the unit who landed the killing blow (or its owner - for pets) regardless of who tapped the victim
|
||||
if (isPet())
|
||||
{
|
||||
if (Unit *owner = GetOwner())
|
||||
owner->ProcDamageAndSpell(pVictim, PROC_FLAG_KILL, PROC_FLAG_KILLED, PROC_EX_NONE, 0);
|
||||
}
|
||||
else
|
||||
ProcDamageAndSpell(pVictim, PROC_FLAG_KILL, PROC_FLAG_KILLED, PROC_EX_NONE, 0);
|
||||
|
||||
// Proc auras on death - must be before aura/combat remove
|
||||
pVictim->ProcDamageAndSpell(NULL, PROC_FLAG_DEATH, PROC_FLAG_NONE, PROC_EX_NONE, 0, BASE_ATTACK, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user