diff options
author | Chaz Brown <iamparadox@netscape.net> | 2009-09-10 01:48:09 -0400 |
---|---|---|
committer | Chaz Brown <iamparadox@netscape.net> | 2009-09-10 01:48:09 -0400 |
commit | ce0a56b25523f5e8a2db21a6361c40d03667cc29 (patch) | |
tree | 2a388651aa2152e9ed02e8804887b0497a259595 /src | |
parent | a67246587a47da04d95f367ec279615ba9a0c67a (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/bindings/scripts/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp | 26 |
1 files changed, 17 insertions, 9 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 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) |