From 214741e9e523b3722f7a023c7d95b64ab768c687 Mon Sep 17 00:00:00 2001 From: megamage Date: Wed, 3 Jun 2009 00:29:23 -0500 Subject: [PATCH] *Fix quest 12687. Note that this is only a workaround. --HG-- branch : trunk --- sql/updates/3736_world_spell_(dk).sql | 3 +++ .../the_scarlet_enclave.cpp | 22 ++++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 sql/updates/3736_world_spell_(dk).sql diff --git a/sql/updates/3736_world_spell_(dk).sql b/sql/updates/3736_world_spell_(dk).sql new file mode 100644 index 0000000000..c4097fef37 --- /dev/null +++ b/sql/updates/3736_world_spell_(dk).sql @@ -0,0 +1,3 @@ +DELETE FROM spell_area WHERE spell = 52693; +INSERT INTO spell_area (`spell`, `area`, `quest_start`, `quest_start_active`, `quest_end`, `aura_spell`, `racemask`, `gender`, `autocast`) VALUES +(52693, 4298, 12687, 1, 12687, 0, 0, 0, 1); diff --git a/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp b/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp index 30511d4596..5889d3c951 100644 --- a/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp +++ b/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp @@ -510,8 +510,8 @@ struct TRINITY_DLL_DECL npc_salanar_the_horsemanAI : public ScriptedAI ((Player*)charmer)->GroupEventHappens(12687, me); ((Player*)charmer)->ExitVehicle(); //without this we can see npc kill the horse - //who->setDeathState(DEAD); - //((Creature*)who)->Respawn(); + who->setDeathState(DEAD); + ((Creature*)who)->Respawn(); } } } @@ -531,6 +531,23 @@ struct TRINITY_DLL_DECL npc_ros_dark_riderAI : public ScriptedAI { npc_ros_dark_riderAI(Creature *c) : ScriptedAI(c) {} + void MoveInLineOfSight(Unit *who) + { + if(me->getVictim()) + return; + + // this should be before next one otherwise he may enter vehicle again + if(!me->m_Vehicle && who->GetEntry() == 28782 && ((Creature*)who)->isVehicle() && !who->GetCharmerGUID()) + me->EnterVehicle((Vehicle*)who); + + ScriptedAI::MoveInLineOfSight(who); + } + + void CombatStart(Unit *who) + { + me->ExitVehicle(); + } + void Reset() { Creature* deathcharger = me->FindNearestCreature(28782, 30); @@ -548,7 +565,6 @@ struct TRINITY_DLL_DECL npc_ros_dark_riderAI : public ScriptedAI { deathcharger->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK); deathcharger->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - deathcharger->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); deathcharger->setFaction(2096); } }