From ce0a56b25523f5e8a2db21a6361c40d03667cc29 Mon Sep 17 00:00:00 2001 From: Chaz Brown Date: Thu, 10 Sep 2009 01:48:09 -0400 Subject: Add forgotten change to world.sql and update script for scarlet ghouls (quest 12698) so they are in defensive mode. Also make it so, if you abandon the quest, you don't get to keep your minions... Still need some official info on these, if anyone can help. --HG-- branch : trunk --- .../eastern_kingdoms/scarlet_enclave/chapter1.cpp | 26 ++++++++++++++-------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'src') 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 eaf3992dabd..d68c0e3c6b8 100644 --- a/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp +++ b/src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp @@ -709,18 +709,26 @@ CreatureAI* GetAI_npc_dkc1_gothik(Creature* pCreature) struct TRINITY_DLL_DECL npc_scarlet_ghoulAI : public ScriptedAI { - npc_scarlet_ghoulAI(Creature *c) : ScriptedAI(c) {} - - void MoveInLineOfSight(Unit *target) + npc_scarlet_ghoulAI(Creature *c) : ScriptedAI(c) { - EnterEvadeMode(); - return; + me->SetReactState(REACT_DEFENSIVE); } - void Aggro(Unit *who) + + void UpdateAI(const uint32 diff) { - EnterEvadeMode(); - return; - } + if (Unit *owner = m_creature->GetOwner()) + { + if (owner->GetTypeId() == TYPEID_PLAYER) + { + if (CAST_PLR(owner)->GetQuestStatus(12698) != QUEST_STATUS_INCOMPLETE) + { + m_creature->ForcedDespawn(); + m_creature->GetOwner()->RemoveAllMinionsByEntry(28845); + } + } + } + ScriptedAI::UpdateAI(diff); + } }; CreatureAI* GetAI_npc_scarlet_ghoul(Creature* pCreature) -- cgit v1.2.3