*Event Hooks (OnLogin, OnLogout, OnPVPKill) by Hawthorne

*Boss Emote Command for DB Scripts by XTElite1

--HG--
branch : trunk
This commit is contained in:
maximius
2009-09-13 00:01:35 -07:00
parent c61bb37a0e
commit eef5abe6e1
14 changed files with 105 additions and 4 deletions
+9
View File
@@ -53,6 +53,7 @@
#include "TemporarySummon.h"
#include "Vehicle.h"
#include "Transports.h"
#include "ScriptCalls.h"
#include <math.h>
@@ -778,6 +779,14 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
((Player*)pVictim)->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_TOTAL_DAMAGE_RECEIVED, health);
Kill(pVictim, durabilityLoss);
//Hook for OnPVPKill Event
if (pVictim->GetTypeId() == TYPEID_PLAYER && this->GetTypeId() == TYPEID_PLAYER)
{
Player *killer = ((Player*)this);
Player *killed = ((Player*)pVictim);
Script->OnPVPKill(killer, killed);
}
}
else // if (health <= damage)
{