*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

View File

@@ -220,6 +220,30 @@ void Script::RegisterSelf()
//********************************
//*** Functions to be Exported ***
TRINITY_DLL_EXPORT
void OnLogin(Player *pPlayer)
{
Script *tmpscript = m_scripts[GetScriptId("scripted_on_events")];
if (!tmpscript || !tmpscript->pOnLogin) return;
tmpscript->pOnLogin(pPlayer);
}
TRINITY_DLL_EXPORT
void OnLogout(Player *pPlayer)
{
Script *tmpscript = m_scripts[GetScriptId("scripted_on_events")];
if (!tmpscript || !tmpscript->pOnLogout) return;
tmpscript->pOnLogout(pPlayer);
}
TRINITY_DLL_EXPORT
void OnPVPKill(Player *killer, Player *killed)
{
Script *tmpscript = m_scripts[GetScriptId("scripted_on_events")];
if (!tmpscript || !tmpscript->pOnPVPKill) return;
tmpscript->pOnPVPKill(killer, killed);
}
TRINITY_DLL_EXPORT
char const* ScriptsVersion()
{