diff options
author | Aokromes <Aokromes@users.noreply.github.com> | 2015-02-13 03:01:23 +0100 |
---|---|---|
committer | Aokromes <Aokromes@users.noreply.github.com> | 2015-02-13 03:01:23 +0100 |
commit | 11f41d9461afa75e5871a3542b6590c1e5494d0f (patch) | |
tree | 544f9d4c1452310818ef036c9649f1f3bcd28416 | |
parent | 62001360dd1d08b2f33fba0f20425867b1b0a069 (diff) | |
parent | adfd8a6172f1140c4ecf07e1bc71003148d677d1 (diff) |
Merge pull request #14129 from Rushor/Ghost
Scripts/Mulgore: The Plains Vision - Move Corescript to SAI
-rw-r--r-- | sql/updates/world/2015_02_12_10_world.sql | 62 | ||||
-rw-r--r-- | src/server/scripts/Kalimdor/zone_mulgore.cpp | 128 |
2 files changed, 62 insertions, 128 deletions
diff --git a/sql/updates/world/2015_02_12_10_world.sql b/sql/updates/world/2015_02_12_10_world.sql new file mode 100644 index 00000000000..cb8f0e95b39 --- /dev/null +++ b/sql/updates/world/2015_02_12_10_world.sql @@ -0,0 +1,62 @@ +-- +UPDATE `creature_template` SET `ScriptName`='' WHERE `entry`=2983; +-- The Plains Vision SAI +SET @ENTRY := 2983; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(@ENTRY,0,0,0,54,0,100,0,0,0,0,0,53,1,2983,0,0,0,0,1,0,0,0,0,0,0,0,"The Plains Vision - On Just Summoned - Start Waypoint"), +(@ENTRY,0,1,0,40,0,100,0,50,2983,0,0,41,1000,0,0,0,0,0,1,0,0,0,0,0,0,0,"The Plains Vision - On Waypoint 50 Reached - Despawn In 1000 ms"); + +DELETE FROM `waypoints` WHERE `entry`=@ENTRY; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(@ENTRY, 1, -2226.32, -408.095, -9.36235, 'The Plains Vision'), +(@ENTRY, 2, -2203.04, -437.212, -5.72498, 'The Plains Vision'), +(@ENTRY, 3, -2163.91, -457.851, -7.09049, 'The Plains Vision'), +(@ENTRY, 4, -2123.87, -448.137, -9.29591, 'The Plains Vision'), +(@ENTRY, 5, -2104.66, -427.166, -6.49513, 'The Plains Vision'), +(@ENTRY, 6, -2101.48, -422.826, -5.3567, 'The Plains Vision'), +(@ENTRY, 7, -2097.56, -417.083, -7.16716, 'The Plains Vision'), +(@ENTRY, 8, -2084.87, -398.626, -9.88973, 'The Plains Vision'), +(@ENTRY, 9, -2072.71, -382.324, -10.2488, 'The Plains Vision'), +(@ENTRY, 10, -2054.05, -356.728, -6.22468, 'The Plains Vision'), +(@ENTRY, 11, -2051.8, -353.645, -5.35791, 'The Plains Vision'), +(@ENTRY, 12, -2049.08, -349.912, -6.15723, 'The Plains Vision'), +(@ENTRY, 13, -2030.6, -310.724, -9.59302, 'The Plains Vision'), +(@ENTRY, 14, -2002.15, -249.308, -10.8124, 'The Plains Vision'), +(@ENTRY, 15, -1972.85, -195.811, -10.6316, 'The Plains Vision'), +(@ENTRY, 16, -1940.93, -147.652, -11.7055, 'The Plains Vision'), +(@ENTRY, 17, -1888.06, -81.943, -11.4404, 'The Plains Vision'), +(@ENTRY, 18, -1837.05, -34.0109, -12.258, 'The Plains Vision'), +(@ENTRY, 19, -1796.12, -14.6462, -10.3581, 'The Plains Vision'), +(@ENTRY, 20, -1732.61, -4.27746, -10.0213, 'The Plains Vision'), +(@ENTRY, 21, -1688.94, -0.829945, -11.7103, 'The Plains Vision'), +(@ENTRY, 22, -1681.32, 13.0313, -9.48056, 'The Plains Vision'), +(@ENTRY, 23, -1677.04, 36.8349, -7.10318, 'The Plains Vision'), +(@ENTRY, 24, -1675.2, 68.559, -8.95384, 'The Plains Vision'), +(@ENTRY, 25, -1676.57, 89.023, -9.65104, 'The Plains Vision'), +(@ENTRY, 26, -1678.16, 110.939, -10.1782, 'The Plains Vision'), +(@ENTRY, 27, -1677.86, 128.681, -5.73869, 'The Plains Vision'), +(@ENTRY, 28, -1675.27, 144.324, -3.47916, 'The Plains Vision'), +(@ENTRY, 29, -1671.7, 163.169, -1.23098, 'The Plains Vision'), +(@ENTRY, 30, -1666.61, 181.584, 5.26145, 'The Plains Vision'), +(@ENTRY, 31, -1661.51, 196.154, 8.95252, 'The Plains Vision'), +(@ENTRY, 32, -1655.47, 210.811, 8.38727, 'The Plains Vision'), +(@ENTRY, 33, -1647.07, 226.947, 5.27755, 'The Plains Vision'), +(@ENTRY, 34, -1621.65, 232.91, 2.69579, 'The Plains Vision'), +(@ENTRY, 35, -1600.23, 237.641, 2.98539, 'The Plains Vision'), +(@ENTRY, 36, -1576.07, 242.546, 4.66541, 'The Plains Vision'), +(@ENTRY, 37, -1554.57, 248.494, 6.60377, 'The Plains Vision'), +(@ENTRY, 38, -1547.53, 259.302, 10.6741, 'The Plains Vision'), +(@ENTRY, 39, -1541.7, 269.847, 16.4418, 'The Plains Vision'), +(@ENTRY, 40, -1539.83, 278.989, 21.0597, 'The Plains Vision'), +(@ENTRY, 41, -1540.16, 290.219, 27.8247, 'The Plains Vision'), +(@ENTRY, 42, -1538.99, 298.983, 34.0032, 'The Plains Vision'), +(@ENTRY, 43, -1540.38, 307.337, 41.3557, 'The Plains Vision'), +(@ENTRY, 44, -1536.61, 314.884, 48.0179, 'The Plains Vision'), +(@ENTRY, 45, -1532.42, 323.277, 55.6667, 'The Plains Vision'), +(@ENTRY, 46, -1528.77, 329.774, 61.1525, 'The Plains Vision'), +(@ENTRY, 47, -1525.65, 333.18, 63.2161, 'The Plains Vision'), +(@ENTRY, 48, -1517.01, 350.713, 62.4286, 'The Plains Vision'), +(@ENTRY, 49, -1511.39, 362.537, 62.4539, 'The Plains Vision'), +(@ENTRY, 50, -1508.68, 366.822, 62.733, 'The Plains Vision'); diff --git a/src/server/scripts/Kalimdor/zone_mulgore.cpp b/src/server/scripts/Kalimdor/zone_mulgore.cpp index 0d0ef218885..c13082f31c1 100644 --- a/src/server/scripts/Kalimdor/zone_mulgore.cpp +++ b/src/server/scripts/Kalimdor/zone_mulgore.cpp @@ -25,7 +25,6 @@ EndScriptData */ /* ContentData npc_kyle_frenzied -npc_plains_vision EndContentData */ #include "ScriptMgr.h" @@ -173,134 +172,7 @@ public: }; -/*##### -# npc_plains_vision -######*/ - -Position const wpPlainVision[50] = -{ - {-2226.32f, -408.095f, -9.36235f, 0.0f}, - {-2203.04f, -437.212f, -5.72498f, 0.0f}, - {-2163.91f, -457.851f, -7.09049f, 0.0f}, - {-2123.87f, -448.137f, -9.29591f, 0.0f}, - {-2104.66f, -427.166f, -6.49513f, 0.0f}, - {-2101.48f, -422.826f, -5.3567f, 0.0f}, - {-2097.56f, -417.083f, -7.16716f, 0.0f}, - {-2084.87f, -398.626f, -9.88973f, 0.0f}, - {-2072.71f, -382.324f, -10.2488f, 0.0f}, - {-2054.05f, -356.728f, -6.22468f, 0.0f}, - {-2051.8f, -353.645f, -5.35791f, 0.0f}, - {-2049.08f, -349.912f, -6.15723f, 0.0f}, - {-2030.6f, -310.724f, -9.59302f, 0.0f}, - {-2002.15f, -249.308f, -10.8124f, 0.0f}, - {-1972.85f, -195.811f, -10.6316f, 0.0f}, - {-1940.93f, -147.652f, -11.7055f, 0.0f}, - {-1888.06f, -81.943f, -11.4404f, 0.0f}, - {-1837.05f, -34.0109f, -12.258f, 0.0f}, - {-1796.12f, -14.6462f, -10.3581f, 0.0f}, - {-1732.61f, -4.27746f, -10.0213f, 0.0f}, - {-1688.94f, -0.829945f, -11.7103f, 0.0f}, - {-1681.32f, 13.0313f, -9.48056f, 0.0f}, - {-1677.04f, 36.8349f, -7.10318f, 0.0f}, - {-1675.2f, 68.559f, -8.95384f, 0.0f}, - {-1676.57f, 89.023f, -9.65104f, 0.0f}, - {-1678.16f, 110.939f, -10.1782f, 0.0f}, - {-1677.86f, 128.681f, -5.73869f, 0.0f}, - {-1675.27f, 144.324f, -3.47916f, 0.0f}, - {-1671.7f, 163.169f, -1.23098f, 0.0f}, - {-1666.61f, 181.584f, 5.26145f, 0.0f}, - {-1661.51f, 196.154f, 8.95252f, 0.0f}, - {-1655.47f, 210.811f, 8.38727f, 0.0f}, - {-1647.07f, 226.947f, 5.27755f, 0.0f}, - {-1621.65f, 232.91f, 2.69579f, 0.0f}, - {-1600.23f, 237.641f, 2.98539f, 0.0f}, - {-1576.07f, 242.546f, 4.66541f, 0.0f}, - {-1554.57f, 248.494f, 6.60377f, 0.0f}, - {-1547.53f, 259.302f, 10.6741f, 0.0f}, - {-1541.7f, 269.847f, 16.4418f, 0.0f}, - {-1539.83f, 278.989f, 21.0597f, 0.0f}, - {-1540.16f, 290.219f, 27.8247f, 0.0f}, - {-1538.99f, 298.983f, 34.0032f, 0.0f}, - {-1540.38f, 307.337f, 41.3557f, 0.0f}, - {-1536.61f, 314.884f, 48.0179f, 0.0f}, - {-1532.42f, 323.277f, 55.6667f, 0.0f}, - {-1528.77f, 329.774f, 61.1525f, 0.0f}, - {-1525.65f, 333.18f, 63.2161f, 0.0f}, - {-1517.01f, 350.713f, 62.4286f, 0.0f}, - {-1511.39f, 362.537f, 62.4539f, 0.0f}, - {-1508.68f, 366.822f, 62.733f, 0.0f} -}; - -class npc_plains_vision : public CreatureScript -{ -public: - npc_plains_vision() : CreatureScript("npc_plains_vision") { } - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_plains_visionAI(creature); - } - - struct npc_plains_visionAI : public ScriptedAI - { - npc_plains_visionAI(Creature* creature) : ScriptedAI(creature) - { - Initialize(); - } - - void Initialize() - { - WayPointId = 0; - newWaypoint = true; - amountWP = 49; - } - - bool newWaypoint; - uint8 WayPointId; - uint8 amountWP; - - void Reset() override - { - Initialize(); - } - - void EnterCombat(Unit* /*who*/) override { } - - void MovementInform(uint32 type, uint32 id) override - { - if (type != POINT_MOTION_TYPE) - return; - - if (id < amountWP) - { - ++WayPointId; - newWaypoint = true; - } - else - { - me->setDeathState(JUST_DIED); - me->RemoveCorpse(); - } - } - - void UpdateAI(uint32 /*diff*/) override - { - if (newWaypoint) - { - me->GetMotionMaster()->MovePoint(WayPointId, wpPlainVision[WayPointId]); - newWaypoint = false; - } - } - }; - -}; - -/*##### -# -######*/ - void AddSC_mulgore() { new npc_kyle_frenzied(); - new npc_plains_vision(); } |