aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authormaximius <none@none>2009-09-23 20:19:21 -0700
committermaximius <none@none>2009-09-23 20:19:21 -0700
commit906b00465ad7c41a018a6c6ea3f37b6c466d38cd (patch)
treedf4aa409d11e89d85fa8d8c3e9a0c424df29f612 /src/game/Unit.cpp
parent8102372a67098e1af65888b0b411eb3b47814bf0 (diff)
*add 11 new event hooks to the OnEvents system, by Hawthorne
--HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp8
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)