*More fixes on escort quests
--HG-- branch : trunk
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user