*More fixes on escort quests

--HG--
branch : trunk
This commit is contained in:
Blaymoira
2009-01-18 11:40:20 +01:00
parent 7c826e5e08
commit 88568e78fb
3 changed files with 8 additions and 3 deletions
@@ -55,6 +55,7 @@ struct TRINITY_DLL_DECL npc_torekAI : public npc_escortAI
uint32 Rend_Timer;
uint32 Thunderclap_Timer;
bool Completed;
void WaypointReached(uint32 i)
{
@@ -79,6 +80,7 @@ struct TRINITY_DLL_DECL npc_torekAI : public npc_escortAI
break;
case 20:
DoScriptText(SAY_WIN, m_creature, player);
Completed = true;
if (player && player->GetTypeId() == TYPEID_PLAYER)
((Player*)player)->GroupEventHappens(QUEST_TOREK_ASSULT,m_creature);
break;
@@ -92,6 +94,7 @@ struct TRINITY_DLL_DECL npc_torekAI : public npc_escortAI
{
Rend_Timer = 5000;
Thunderclap_Timer = 8000;
Completed = false;
}
void Aggro(Unit* who)
@@ -105,7 +108,7 @@ struct TRINITY_DLL_DECL npc_torekAI : public npc_escortAI
void JustDied(Unit* killer)
{
if (PlayerGUID)
if (PlayerGUID && !Completed)
{
if (Unit* player = Unit::GetUnit((*m_creature), PlayerGUID))
((Player*)player)->FailQuest(QUEST_TOREK_ASSULT);
@@ -305,6 +305,7 @@ struct TRINITY_DLL_DECL npc_kayra_longmaneAI : public npc_escortAI
case 19: m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
DoSay(SAY_PROGRESS_5, LANG_UNIVERSAL, player); break;
case 26: DoSay(SAY_PROGRESS_6, LANG_UNIVERSAL, player);
Completed = true;
if(player)
((Player*)player)->GroupEventHappens(QUEST_EFU, m_creature);
break;
@@ -313,7 +314,7 @@ struct TRINITY_DLL_DECL npc_kayra_longmaneAI : public npc_escortAI
void JustDied(Unit* killer)
{
if (PlayerGUID)
if (PlayerGUID && !Completed)
{
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
if (player && !Completed)