*Fix the bug that .start always send dk back to start zone.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-17 23:51:08 -05:00
parent 98f58a0f0a
commit a690f5239c
5 changed files with 17 additions and 6 deletions

View File

@@ -386,7 +386,7 @@ struct TRINITY_DLL_DECL npc_death_knight_initiateAI : public SpellAI
pDoneBy->AttackStop();
me->CastSpell(pDoneBy, SPELL_DUEL_VICTORY, true);
lose = true;
me->CastSpell(me, 7267, true);
me->CastSpell(me, SPELL_ID_DUEL_BEG, true);
me->RestoreFaction();
}
}
@@ -416,14 +416,14 @@ struct TRINITY_DLL_DECL npc_death_knight_initiateAI : public SpellAI
{
if (lose)
{
if (!me->HasAura(7267))
if (!me->HasAura(SPELL_ID_DUEL_BEG))
EnterEvadeMode();
return;
}
else if (me->getVictim()->GetTypeId() == TYPEID_PLAYER
&& me->getVictim()->GetHealth() * 10 < me->getVictim()->GetMaxHealth())
{
me->getVictim()->CastSpell(me->getVictim(), 7267, true); // beg
me->getVictim()->CastSpell(me->getVictim(), SPELL_ID_DUEL_BEG, true); // beg
me->getVictim()->RemoveGameObject(SPELL_DUEL_FLAG, true);
EnterEvadeMode();
return;