diff options
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index f9aa1a964c0..4ab2f05dc49 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -785,7 +785,13 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa { Player *killer = ((Player*)this); Player *killed = ((Player*)pVictim); - Script->OnPVPKill(killer, killed); + killer->GetSession()->HandleOnPVPKill(killed); + } + if (pVictim->GetTypeId() == TYPEID_UNIT && this->GetTypeId() == TYPEID_PLAYER) + { + Player *killer = ((Player*)this); + Creature *pCreature = ((Creature*)pVictim); + killer->GetSession()->HandleOnCreatureKill(pCreature); } } else // if (health <= damage) |