aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-08-16 16:54:31 -0500
committermegamage <none@none>2009-08-16 16:54:31 -0500
commitbf3928d16352e1c0034ae41aebc69a21504870de (patch)
tree027987004f2a43951caa659e782f219297ed1911 /src
parent68e0c6fcbdc54dab725dbef2369d78d07477c29b (diff)
*Fix endless hunger quest.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp
index e07b96ceb2b..9b086ea0853 100644
--- a/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp
+++ b/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp
@@ -213,12 +213,14 @@ void npc_unworthy_initiateAI::UpdateAI(const uint32 diff)
if (!prison)
return;
- if (Creature* trigger = me->FindNearestCreature(29521, 30))
+ prison->ResetDoorOrButton();
+
+ if (Creature* anchor = me->FindNearestCreature(29521, 30))
{
- prison->ResetDoorOrButton();
- trigger->AI()->SetGUID(m_creature->GetGUID());
- trigger->CastSpell(me, SPELL_SOUL_PRISON_CHAIN, true);
- anchorGUID = trigger->GetGUID();
+ anchor->GetPosition(targ_x, targ_y, targ_z);
+ anchor->AI()->SetGUID(m_creature->GetGUID());
+ anchor->CastSpell(me, SPELL_SOUL_PRISON_CHAIN, true);
+ anchorGUID = anchor->GetGUID();
}
}
return;