diff --git a/data/sql/updates/pending_db_world/enchanted-elemental-walk.sql b/data/sql/updates/pending_db_world/enchanted-elemental-walk.sql new file mode 100644 index 000000000..7d44834fa --- /dev/null +++ b/data/sql/updates/pending_db_world/enchanted-elemental-walk.sql @@ -0,0 +1,10 @@ +-- +DELETE FROM `smart_scripts` WHERE `entryorguid` = 21958 AND `source_type` = 0; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(21958, 0, 0, 0, 54, 0, 100, 512, 0, 0, 0, 0, 0, 0, 53, 0, 2195800, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Enchanted Elemental - Just Summoned - Start Waypoint'), +(21958, 0, 1, 0, 75, 0, 100, 0, 0, 21212, 2, 1000, 0, 0, 11, 38044, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Enchanted Elemental - On Distance to Vashj - Cast Spell Surge'), +(21958, 0, 2, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Enchanted Elemental - On Aggro - Set In Combat With Zone'); + +DELETE FROM `waypoints` WHERE `entry` = 2195800; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `point_comment`) VALUES +(2195800, 1, 29.415501, -924.127991, 42.901901, NULL, 0, 'Enchanted Elemental - Vashj Home Position'); diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp index 5a4e52876..e596f819b 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp @@ -66,26 +66,6 @@ enum Misc POINT_HOME = 1, }; -class startFollow : public BasicEvent -{ -public: - startFollow(Unit* owner) : _owner(owner) { } - - bool Execute(uint64 /*execTime*/, uint32 /*diff*/) override - { - if (InstanceScript* instance = _owner->GetInstanceScript()) - { - if (Creature* vashj = ObjectAccessor::GetCreature(*_owner, instance->GetGuidData(NPC_LADY_VASHJ))) - { - _owner->GetMotionMaster()->MoveFollow(vashj, 3.0f, vashj->GetAngle(_owner), MOTION_SLOT_CONTROLLED); - } - } - return true; - } -private: - Unit* _owner; -}; - struct boss_lady_vashj : public BossAI { boss_lady_vashj(Creature* creature) : BossAI(creature, DATA_LADY_VASHJ) @@ -147,16 +127,11 @@ struct boss_lady_vashj : public BossAI { summon->CastSpell(summon, SPELL_MAGIC_BARRIER); } - else if (summon->GetEntry() == NPC_ENCHANTED_ELEMENTAL) - { - summon->SetWalk(true); - summon->m_Events.AddEvent(new startFollow(summon), summon->m_Events.CalculateTime(0)); - } else if (summon->GetEntry() == NPC_TOXIC_SPOREBAT) { summon->GetMotionMaster()->MoveRandom(30.0f); } - else if (summon->GetEntry() != NPC_TAINTED_ELEMENTAL) + else if (summon->GetEntry() != NPC_TAINTED_ELEMENTAL && summon->GetEntry() != NPC_ENCHANTED_ELEMENTAL) { summon->GetMotionMaster()->MovePoint(POINT_HOME, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), true, true); }