aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author_manuel_ <manue.l@live.com.ar>2010-05-26 17:04:23 -0300
committer_manuel_ <manue.l@live.com.ar>2010-05-26 17:04:23 -0300
commit033d688d8e0cd579a0e4288ad3848321e508f66d (patch)
tree41f986357901b0e631072406de89072b48235393 /src
parente33e700a78b9b91d2f16ac6e387c2f2d92b65c6d (diff)
Re-implemented pointers to npcs, now quest "The Attack" is working again.
Resolves issue #1567 --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/scripts/eastern_kingdoms/stormwind_city.cpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/scripts/eastern_kingdoms/stormwind_city.cpp b/src/scripts/eastern_kingdoms/stormwind_city.cpp
index e0dc65dc766..36a7d116c3b 100644
--- a/src/scripts/eastern_kingdoms/stormwind_city.cpp
+++ b/src/scripts/eastern_kingdoms/stormwind_city.cpp
@@ -551,11 +551,8 @@ struct npc_tyrion_spybotAI : public npc_escortAI
uiPhase = 2;
break;
case 2:
- /*
- FIXME: Why have this if pTyrion not declared?
- if (pTyrion)
+ if (Creature* pTyrion = me->FindNearestCreature(NPC_TYRION,10.0f))
DoScriptText(SAY_TYRION_1, pTyrion);
- */
uiTimer = 3000;
uiPhase = 3;
break;
@@ -586,11 +583,8 @@ struct npc_tyrion_spybotAI : public npc_escortAI
uiPhase = 0;
break;
case 8:
- /*
- FIXME: Why have this if pLescovar not declared?
- if (pLescovar)
+ if (Creature* pLescovar = me->FindNearestCreature(NPC_LORD_GREGOR_LESCOVAR,10.0f))
DoScriptText(SAY_LESCOVAR_1, pLescovar);
- */
uiTimer = 3000;
uiPhase = 9;
break;
@@ -600,15 +594,14 @@ struct npc_tyrion_spybotAI : public npc_escortAI
uiPhase = 10;
break;
case 10:
- /*
- FIXME: Why have this if pLescovar not declared?
- if (pLescovar && pLescovar->isAlive())
+ if (Creature* pLescovar = me->FindNearestCreature(NPC_LORD_GREGOR_LESCOVAR,10.0f))
{
if (Player* pPlayer = GetPlayerForEscort())
+ {
CAST_AI(npc_lord_gregor_lescovarAI,pLescovar->AI())->Start(false, false, pPlayer->GetGUID());
- CAST_AI(npc_lord_gregor_lescovarAI, pLescovar->AI())->SetMaxPlayerDistance(200.0f);
+ CAST_AI(npc_lord_gregor_lescovarAI, pLescovar->AI())->SetMaxPlayerDistance(200.0f);
+ }
}
- */
me->DisappearAndDie();
uiTimer = 0;
uiPhase = 0;