From 906b00465ad7c41a018a6c6ea3f37b6c466d38cd Mon Sep 17 00:00:00 2001 From: maximius Date: Wed, 23 Sep 2009 20:19:21 -0700 Subject: *add 11 new event hooks to the OnEvents system, by Hawthorne --HG-- branch : trunk --- src/game/Unit.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/game/Unit.cpp') 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) -- cgit v1.2.3