Improved the kill proc slightly.

--HG--
branch : trunk
This commit is contained in:
Xanadu
2010-03-20 18:49:50 +01:00
parent b651b592ef
commit 830062779e
+3 -4
View File
@@ -14589,14 +14589,13 @@ void Unit::Kill(Unit *pVictim, bool durabilityLoss)
player->RewardPlayerAndGroupAtKill(pVictim); player->RewardPlayerAndGroupAtKill(pVictim);
} }
// 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 // Do KILL and KILLED procs. KILL proc is called only for the unit who landed the killing blow (and its owner - for pets and totems) regardless of who tapped the victim
if (isPet()) if (isPet() || isTotem())
{ {
if (Unit *owner = GetOwner()) if (Unit *owner = GetOwner())
owner->ProcDamageAndSpell(pVictim, PROC_FLAG_KILL, PROC_FLAG_KILLED, PROC_EX_NONE, 0); 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);
ProcDamageAndSpell(pVictim, PROC_FLAG_KILL, PROC_FLAG_KILLED, PROC_EX_NONE, 0);
// Proc auras on death - must be before aura/combat remove // 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); pVictim->ProcDamageAndSpell(NULL, PROC_FLAG_DEATH, PROC_FLAG_NONE, PROC_EX_NONE, 0, BASE_ATTACK, 0);