rendered paste bodyIndex: src/ascent-world/HonorHandler.cpp
===================================================================
--- src/ascent-world/HonorHandler.cpp (revision 4337)
+++ src/ascent-world/HonorHandler.cpp (working copy)
@@ -190,6 +190,7 @@
gPlayer->m_bg->HookOnHK(gPlayer);
AddHonorPointsToPlayer(gPlayer, GroupPoints);
+ sHookInterface.OnHonorableKill(gPlayer, pVictim);
if(pVictim)
{
// Send PVP credit
@@ -229,6 +230,7 @@
if(pPlayer->m_bg)
pPlayer->m_bg->HookOnHK(pPlayer);
+ sHookInterface.OnHonorableKill(pPlayer, pVictim);
if(pVictim)
{
// Send PVP credit
Index: src/ascent-world/ScriptMgr.cpp
===================================================================
--- src/ascent-world/ScriptMgr.cpp (revision 4337)
+++ src/ascent-world/ScriptMgr.cpp (working copy)
@@ -864,3 +864,10 @@
(call)(pPlayer, pQuest);
OUTER_LOOP_END
}
+
+void HookInterface::OnHonorableKill(Player * pPlayer, Player * pKilled)
+{
+ OUTER_LOOP_BEGIN(SERVER_HOOK_EVENT_ON_HONORABLE_KILL, tOnHonorableKill)
+ (call)(pPlayer, pKilled);
+ OUTER_LOOP_END
+}
\ No newline at end of file
Index: src/ascent-world/ScriptMgr.h
===================================================================
--- src/ascent-world/ScriptMgr.h (revision 4337)
+++ src/ascent-world/ScriptMgr.h (working copy)
@@ -50,6 +50,7 @@
SERVER_HOOK_EVENT_ON_CHARACTER_CREATE = 20,
SERVER_HOOK_EVENT_ON_QUEST_CANCELLED = 21,
SERVER_HOOK_EVENT_ON_QUEST_FINISHED = 22,
+ SERVER_HOOK_EVENT_ON_HONORABLE_KILL = 23,
NUM_SERVER_HOOKS,
};
@@ -87,6 +88,7 @@
typedef bool(*ItemScript)(Item * pItem, Player * pPlayer);
typedef void(*tOnQuestCancel)(Player * pPlayer, Quest * pQuest);
typedef void(*tOnQuestFinished)(Player * pPlayer, Quest * pQuest);
+typedef void(*tOnHonorableKill)(Player * pPlayer, Player * pKilled);
class Spell;
class Aura;
@@ -277,6 +279,7 @@
void OnCharacterCreate(Player * pPlayer);
void OnQuestCancelled(Player * pPlayer, Quest * pQuest);
void OnQuestFinished(Player * pPlayer, Quest * pQuest);
+ void OnHonorableKill(Player * pPlayer, Player * pKilled);
};
#define sScriptMgr ScriptMgr::getSingleton()