Core/ScriptMgr: Add hooks for duel phases: OnDuelRequest, OnDuelStart, OnDuelEnd

--HG--
branch : trunk
This commit is contained in:
Shocker
2010-09-13 01:42:14 +03:00
parent 21182308b3
commit 4908187578
4 changed files with 33 additions and 0 deletions
@@ -7173,6 +7173,8 @@ void Player::DuelComplete(DuelCompleteType type)
SendMessageToSet(&data,true);
}
sScriptMgr.OnPlayerDuelEnd(duel->opponent, this, type);
switch (type)
{
case DUEL_FLED:
@@ -18476,6 +18478,8 @@ void Player::UpdateDuelFlag(time_t currTime)
if (!duel || duel->startTimer == 0 ||currTime < duel->startTimer + 3)
return;
sScriptMgr.OnPlayerDuelStart(this, duel->opponent);
SetUInt32Value(PLAYER_DUEL_TEAM, 1);
duel->opponent->SetUInt32Value(PLAYER_DUEL_TEAM, 2);