*More fixes on escort quests
--HG-- branch : trunk
This commit is contained in:
@@ -1,2 +1,3 @@
|
|||||||
update creature_template set scriptname='npc_kayra_longmane' where entry=17969;
|
update creature_template set scriptname='npc_kayra_longmane' where entry=17969;
|
||||||
delete from creature_template_addon where entry=17969;
|
delete from creature_template_addon where entry=17969;
|
||||||
|
update quest_template set specialflags=2 where entry=9752;
|
||||||
@@ -55,6 +55,7 @@ struct TRINITY_DLL_DECL npc_torekAI : public npc_escortAI
|
|||||||
|
|
||||||
uint32 Rend_Timer;
|
uint32 Rend_Timer;
|
||||||
uint32 Thunderclap_Timer;
|
uint32 Thunderclap_Timer;
|
||||||
|
bool Completed;
|
||||||
|
|
||||||
void WaypointReached(uint32 i)
|
void WaypointReached(uint32 i)
|
||||||
{
|
{
|
||||||
@@ -79,6 +80,7 @@ struct TRINITY_DLL_DECL npc_torekAI : public npc_escortAI
|
|||||||
break;
|
break;
|
||||||
case 20:
|
case 20:
|
||||||
DoScriptText(SAY_WIN, m_creature, player);
|
DoScriptText(SAY_WIN, m_creature, player);
|
||||||
|
Completed = true;
|
||||||
if (player && player->GetTypeId() == TYPEID_PLAYER)
|
if (player && player->GetTypeId() == TYPEID_PLAYER)
|
||||||
((Player*)player)->GroupEventHappens(QUEST_TOREK_ASSULT,m_creature);
|
((Player*)player)->GroupEventHappens(QUEST_TOREK_ASSULT,m_creature);
|
||||||
break;
|
break;
|
||||||
@@ -92,6 +94,7 @@ struct TRINITY_DLL_DECL npc_torekAI : public npc_escortAI
|
|||||||
{
|
{
|
||||||
Rend_Timer = 5000;
|
Rend_Timer = 5000;
|
||||||
Thunderclap_Timer = 8000;
|
Thunderclap_Timer = 8000;
|
||||||
|
Completed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Aggro(Unit* who)
|
void Aggro(Unit* who)
|
||||||
@@ -105,7 +108,7 @@ struct TRINITY_DLL_DECL npc_torekAI : public npc_escortAI
|
|||||||
|
|
||||||
void JustDied(Unit* killer)
|
void JustDied(Unit* killer)
|
||||||
{
|
{
|
||||||
if (PlayerGUID)
|
if (PlayerGUID && !Completed)
|
||||||
{
|
{
|
||||||
if (Unit* player = Unit::GetUnit((*m_creature), PlayerGUID))
|
if (Unit* player = Unit::GetUnit((*m_creature), PlayerGUID))
|
||||||
((Player*)player)->FailQuest(QUEST_TOREK_ASSULT);
|
((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);
|
case 19: m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||||
DoSay(SAY_PROGRESS_5, LANG_UNIVERSAL, player); break;
|
DoSay(SAY_PROGRESS_5, LANG_UNIVERSAL, player); break;
|
||||||
case 26: DoSay(SAY_PROGRESS_6, LANG_UNIVERSAL, player);
|
case 26: DoSay(SAY_PROGRESS_6, LANG_UNIVERSAL, player);
|
||||||
|
Completed = true;
|
||||||
if(player)
|
if(player)
|
||||||
((Player*)player)->GroupEventHappens(QUEST_EFU, m_creature);
|
((Player*)player)->GroupEventHappens(QUEST_EFU, m_creature);
|
||||||
break;
|
break;
|
||||||
@@ -313,7 +314,7 @@ struct TRINITY_DLL_DECL npc_kayra_longmaneAI : public npc_escortAI
|
|||||||
|
|
||||||
void JustDied(Unit* killer)
|
void JustDied(Unit* killer)
|
||||||
{
|
{
|
||||||
if (PlayerGUID)
|
if (PlayerGUID && !Completed)
|
||||||
{
|
{
|
||||||
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
|
||||||
if (player && !Completed)
|
if (player && !Completed)
|
||||||
|
|||||||
Reference in New Issue
Block a user