mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-17 13:29:41 -04:00
*Event Hooks (OnLogin, OnLogout, OnPVPKill) by Hawthorne
*Boss Emote Command for DB Scripts by XTElite1 --HG-- branch : trunk
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user