diff options
author | Sorikoff <46191832+Sorikoff@users.noreply.github.com> | 2020-02-22 22:05:50 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-12-22 01:01:58 +0100 |
commit | f0f7cecc01a3fe50f10d6b03e16ebe72933a84e4 (patch) | |
tree | 13c67a67df9b60716fd1cf28ce86731e58d585b5 | |
parent | fa6902cd28b7f96c940870596c4d9067b5e2178f (diff) |
Scripts/Ebon Hold: Massacre At Light's Point (#24106)
* Scripts/Ebon Hold: Massacre At Light's Point
* Update 9999_99_99_99_world.sql
* Final stuff
* Rename 9999_99_99_99_world.sql to 2020_02_22_00_world.sql
Co-authored-by: Eridium <6587064+Killyana@users.noreply.github.com>
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit 0f265b4af6c8c63539deaf781b742a743627206d)
-rw-r--r-- | sql/updates/world/master/2021_12_21_33_world_2020_02_22_00_world.sql | 88 | ||||
-rw-r--r-- | src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp | 230 |
2 files changed, 88 insertions, 230 deletions
diff --git a/sql/updates/world/master/2021_12_21_33_world_2020_02_22_00_world.sql b/sql/updates/world/master/2021_12_21_33_world_2020_02_22_00_world.sql new file mode 100644 index 00000000000..92239df23ed --- /dev/null +++ b/sql/updates/world/master/2021_12_21_33_world_2020_02_22_00_world.sql @@ -0,0 +1,88 @@ +-- Inconspicuous Mine Car +UPDATE `gameobject` SET `position_x`=2391.736,`position_y`=-5898.792,`position_z`=109.3904,`orientation`=0.6981314,`rotation3`=0.9396927 WHERE `guid`=65890 AND `id`=190767; +-- Mine Car +UPDATE `creature_template` SET `minlevel`=56,`maxlevel`=56 WHERE `entry` = 28817; +UPDATE `creature_template` SET `ScriptName`='',`AIName`='SmartAI' WHERE `entry`=28817; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=28817; +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`, `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 +(28817,0,0,0,54,0,100,0,0,0,0,0,0,3,0,25703,0,0,0,0,1,0,0,0,0,0,0,0,0,'Mine Car - On spawned - Set model'), +(28817,0,1,0,27,0,100,0,0,0,0,0,0,11,52464,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Mine Car - On passenger boarded - Cast spell \'Summon Scarlet Miner\''), +(28817,0,2,0,8,0,100,1,52595,0,0,0,0,29,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,'Mine Car - On spell hit - Set follow'), +(28817,0,3,0,28,0,100,0,0,0,0,0,0,41,0,0,0,0,0,0,19,28841,9,0,0,0,0,0,0,'Mine Car - On passenger removed - Despawn \'Scarlet Miner\''); +-- Summon Scarlet Miner +UPDATE `spell_target_position` SET `PositionX`=2384.13,`PositionY`=-5900.07,`PositionZ`=108.0813 WHERE `ID`=52464; +UPDATE `spell_target_position` SET `PositionX`=2389.58,`PositionY`=-5901.18,`PositionZ`=108.9380 WHERE `ID`=52462; + +-- Scarlet Miner +DELETE FROM `waypoints` WHERE `entry` IN (2884100,2884101); +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(2884100,1, 2376.892, -5906.246, 108.5153,'Scarlet Miner'), +(2884100,2, 2354.759, -5905.348, 104.9017,'Scarlet Miner'), +(2884100,3, 2331.889, -5903.588, 100.0160,'Scarlet Miner'), +(2884100,4, 2308.977, -5905.764, 90.91159,'Scarlet Miner'), +(2884100,5, 2298.572, -5914.677, 84.70060,'Scarlet Miner'), +(2884100,6, 2291.055, -5934.960, 70.15641,'Scarlet Miner'), +(2884100,7, 2282.350, -5954.375, 57.76657,'Scarlet Miner'), +(2884100,8, 2275.099, -5964.198, 51.61853,'Scarlet Miner'), +(2884100,9, 2260.797, -5972.555, 43.49573,'Scarlet Miner'), +(2884100,10, 2245.771, -5980.806, 34.91277,'Scarlet Miner'), +(2884100,11, 2236.629, -5991.123, 29.03914,'Scarlet Miner'), +(2884100,12, 2197.551, -6068.021, 4.954395,'Scarlet Miner'), +(2884100,13, 2183.802, -6092.537, 1.664639,'Scarlet Miner'), +(2884100,14, 2178.071, -6118.517, 1.298641,'Scarlet Miner'), +(2884100,15, 2173.443, -6140.669, 1.102578,'Scarlet Miner'), +(2884100,16, 2167.344, -6150.516, 1.348482,'Scarlet Miner'), +(2884100,17, 2156.898, -6155.389, 1.925997,'Scarlet Miner'), +(2884100,18, 2141.903, -6161.750, 1.179094,'Scarlet Miner'), +(2884100,19, 2137.161, -6163.067, 1.066367,'Scarlet Miner'), +(2884100,20, 2131.983, -6170.813, 2.067344,'Scarlet Miner'), +(2884100,21, 2126.371, -6179.504, 8.487098,'Scarlet Miner'), +(2884100,22, 2122.159, -6186.258, 13.99542,'Scarlet Miner'), +(2884100,23, 2115.892, -6196.246, 13.67582,'Scarlet Miner'), +(2884101,1, 2376.892, -5906.246, 108.515,'Scarlet Miner'), +(2884101,2, 2354.759, -5905.348, 104.901,'Scarlet Miner'), +(2884101,3, 2331.889, -5903.588, 100.016,'Scarlet Miner'), +(2884101,4, 2308.977, -5905.764, 90.9115,'Scarlet Miner'), +(2884101,5, 2298.572, -5914.677, 84.7006,'Scarlet Miner'), +(2884101,6, 2291.055, -5934.960, 70.1564,'Scarlet Miner'), +(2884101,7, 2282.350, -5954.375, 57.7665,'Scarlet Miner'), +(2884101,8, 2275.099, -5964.198, 51.6185,'Scarlet Miner'), +(2884101,9, 2260.797, -5972.555, 43.4957,'Scarlet Miner'), +(2884101,10, 2245.771, -5980.806, 34.9127,'Scarlet Miner'), +(2884101,11, 2236.629, -5991.123, 29.0391,'Scarlet Miner'), +(2884101,12, 2197.551, -6068.021, 4.95439,'Scarlet Miner'), +(2884101,13, 2183.802, -6092.537, 1.66463,'Scarlet Miner'), +(2884101,14, 2178.071, -6118.517, 1.29864,'Scarlet Miner'), +(2884101,15, 2173.443, -6140.669, 1.10257,'Scarlet Miner'), +(2884101,16, 2176.981, -6153.453, 1.64646,'Scarlet Miner'), +(2884101,17, 2185.705, -6165.262, 1.09934,'Scarlet Miner'), +(2884101,18, 2199.173, -6167.276, 1.05963,'Scarlet Miner'), +(2884101,19, 2220.801, -6165.641, 1.25961,'Scarlet Miner'), +(2884101,20, 2250.129, -6162.287, 0.91468,'Scarlet Miner'), +(2884101,21, 2262.414, -6163.124, 1.49738,'Scarlet Miner'), +(2884101,22, 2268.944, -6167.533, 1.26519,'Scarlet Miner'), +(2884101,23, 2269.859, -6174.558, 5.10841,'Scarlet Miner'), +(2884101,24, 2270.228, -6180.257, 8.81259,'Scarlet Miner'), +(2884101,25, 2270.822, -6184.768, 12.4218,'Scarlet Miner'), +(2884101,26, 2271.095, -6187.314, 13.9912,'Scarlet Miner'), +(2884101,27, 2273.838, -6196.402, 13.65775,'Scarlet Miner'); + +UPDATE `creature_template` SET `ScriptName`='',`AIName`='SmartAI' WHERE `entry`=28841; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=28841; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid` IN (2884100,2884101,2884102); +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`, `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 +(28841,0,0,1,54,0,100,0,0,0,0,0,0,59,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Scarlet Miner - On just summoned - Set Run off'), +(28841,0,1,0,61,0,100,0,0,0,0,0,0,69,0,0,0,0,0,0,8,0,0,0,0,2386.673,-5900.587,108.5761,0,'Scarlet Miner - On just summoned - Move'), +(28841,0,2,3,34,0,100,0,8,0,0,0,0,66,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,'Scarlet Miner - On movement inform - Set orientation'), +(28841,0,3,4,61,0,100,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Scarlet Miner - Linked event - Say line 0'), +(28841,0,4,0,61,0,100,0,0,0,0,0,0,87,2884100,2884101,0,0,0,0,1,0,0,0,0,0,0,0,0,'Scarlet Miner - Linked event - Random action list'), +(28841,0,5,0,58,0,100,0,0,0,0,0,0,80,2884102,0,1,0,0,0,1,0,0,0,0,0,0,0,0,'Scarlet Miner - On WP ended - Action list 2'), +(2884100,9,0,0,0,0,100,0,4000,4000,0,0,0,11,52595,0,0,0,0,0,23,0,0,0,0,0,0,0,0,'Scarlet Miner - Action list 0 - Cast spell \'Drag Mine Cart\''), +(2884100,9,1,0,61,0,100,0,0,0,0,0,0,53,1,2884100,0,0,0,0,1,0,0,0,0,0,0,0,0,'Scarlet Miner - Action list 0 - Start WP'), +(2884101,9,0,0,0,0,100,0,4000,4000,0,0,0,11,52595,0,0,0,0,0,23,0,0,0,0,0,0,0,0,'Scarlet Miner - Action list 1 - Cast spell \'Drag Mine Cart\''), +(2884101,9,1,0,0,0,100,0,0,0,0,0,0,53,1,2884101,0,0,0,0,1,0,0,0,0,0,0,0,0,'Scarlet Miner - Action list 1 - Start WP'), +(2884102,9,0,0,0,0,100,0,4000,4000,0,0,0,28,52595,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Scarlet Miner - Action list 2 - Remove aura'), +(2884102,9,1,0,0,0,100,0,0,0,0,0,0,66,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,'Scarlet Miner - Action list 2 - Set orientation'), +(2884102,9,2,0,0,0,100,0,1000,1000,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Scarlet Miner - Action list 2 - Say line 1'), +(2884102,9,3,0,0,0,100,0,0,0,0,0,0,41,1000,0,0,0,0,0,23,0,0,0,0,0,0,0,0,'Scarlet Miner - Action list 2 - Despawn \'Mine Car\''), +(2884102,9,4,0,0,0,100,0,0,0,0,0,0,41,1000,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Scarlet Miner - Action list 2 - Despawn self'); diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index c5a7b89293d..d4aa53b7803 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -1070,7 +1070,6 @@ public: } } }; - }; enum GiftOfTheHarvester @@ -1107,233 +1106,6 @@ class spell_gift_of_the_harvester : public SpellScript } }; -/*#### -## npc_scarlet_miner_cart -####*/ - -enum ScarletMinerCart -{ - SPELL_CART_CHECK = 54173, - SPELL_SUMMON_CART = 52463, - SPELL_SUMMON_MINER = 52464, - SPELL_CART_DRAG = 52465, - - NPC_MINER = 28841 -}; - -class npc_scarlet_miner_cart : public CreatureScript -{ - public: - npc_scarlet_miner_cart() : CreatureScript("npc_scarlet_miner_cart") { } - - struct npc_scarlet_miner_cartAI : public PassiveAI - { - npc_scarlet_miner_cartAI(Creature* creature) : PassiveAI(creature) - { - me->SetDisplayFromModel(0); // Modelid2 - } - - void JustSummoned(Creature* summon) override - { - if (summon->GetEntry() == NPC_MINER) - { - _minerGUID = summon->GetGUID(); - summon->AI()->SetGUID(_playerGUID); - } - } - - void SummonedCreatureDespawn(Creature* summon) override - { - if (summon->GetEntry() == NPC_MINER) - _minerGUID.Clear(); - } - - void DoAction(int32 /*param*/) override - { - if (Creature* miner = ObjectAccessor::GetCreature(*me, _minerGUID)) - { - me->SetWalk(false); - - // Not 100% correct, but movement is smooth. Sometimes miner walks faster - // than normal, this speed is fast enough to keep up at those times. - me->SetSpeedRate(MOVE_RUN, 1.25f); - - me->GetMotionMaster()->MoveFollow(miner, 1.0f, 0); - } - } - - void PassengerBoarded(Unit* who, int8 /*seatId*/, bool apply) override - { - if (apply) - { - _playerGUID = who->GetGUID(); - me->CastSpell(nullptr, SPELL_SUMMON_MINER, true); - } - else - { - _playerGUID.Clear(); - if (Creature* miner = ObjectAccessor::GetCreature(*me, _minerGUID)) - miner->DespawnOrUnsummon(); - } - } - - private: - ObjectGuid _minerGUID; - ObjectGuid _playerGUID; - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_scarlet_miner_cartAI(creature); - } -}; - -/*#### -## npc_scarlet_miner -####*/ - -enum Says_SM -{ - SAY_SCARLET_MINER_0 = 0, - SAY_SCARLET_MINER_1 = 1 -}; - -class npc_scarlet_miner : public CreatureScript -{ - public: - npc_scarlet_miner() : CreatureScript("npc_scarlet_miner") { } - - struct npc_scarlet_minerAI : public EscortAI - { - npc_scarlet_minerAI(Creature* creature) : EscortAI(creature) - { - Initialize(); - me->SetReactState(REACT_PASSIVE); - } - - void Initialize() - { - carGUID.Clear(); - IntroTimer = 0; - IntroPhase = 0; - } - - uint32 IntroTimer; - uint32 IntroPhase; - ObjectGuid carGUID; - - void Reset() override - { - Initialize(); - } - - void IsSummonedBy(WorldObject* summoner) override - { - carGUID = summoner->GetGUID(); - } - - void InitWaypoint() - { - AddWaypoint(1, 2389.03f, -5902.74f, 109.014f, 0.f, 5000); - AddWaypoint(2, 2341.812012f, -5900.484863f, 102.619743f); - AddWaypoint(3, 2306.561279f, -5901.738281f, 91.792419f); - AddWaypoint(4, 2300.098389f, -5912.618652f, 86.014885f); - AddWaypoint(5, 2294.142090f, -5927.274414f, 75.316849f); - AddWaypoint(6, 2286.984375f, -5944.955566f, 63.714966f); - AddWaypoint(7, 2280.001709f, -5961.186035f, 54.228283f); - AddWaypoint(8, 2259.389648f, -5974.197754f, 42.359348f); - AddWaypoint(9, 2242.882812f, -5984.642578f, 32.827850f); - AddWaypoint(10, 2217.265625f, -6028.959473f, 7.675705f); - AddWaypoint(11, 2202.595947f, -6061.325684f, 5.882018f); - AddWaypoint(12, 2188.974609f, -6080.866699f, 3.370027f); - - if (urand(0, 1)) - { - AddWaypoint(13, 2176.483887f, -6110.407227f, 1.855181f); - AddWaypoint(14, 2172.516602f, -6146.752441f, 1.074235f); - AddWaypoint(15, 2138.918457f, -6158.920898f, 1.342926f); - AddWaypoint(16, 2129.866699f, -6174.107910f, 4.380779f); - AddWaypoint(17, 2117.709473f, -6193.830078f, 13.3542f, 0.f, 10000); - } - else - { - AddWaypoint(13, 2184.190186f, -6166.447266f, 0.968877f); - AddWaypoint(14, 2234.265625f, -6163.741211f, 0.916021f); - AddWaypoint(15, 2268.071777f, -6158.750977f, 1.822252f); - AddWaypoint(16, 2270.028320f, -6176.505859f, 6.340538f); - AddWaypoint(17, 2271.739014f, -6195.401855f, 13.3542f, 0.f, 10000); - } - } - - void SetGUID(ObjectGuid const& guid, int32 /*id*/) override - { - InitWaypoint(); - Start(false, false, guid); - SetDespawnAtFar(false); - } - - void WaypointReached(uint32 waypointId, uint32 /*pathId*/) override - { - switch (waypointId) - { - case 1: - if (Unit* car = ObjectAccessor::GetCreature(*me, carGUID)) - me->SetFacingToObject(car); - Talk(SAY_SCARLET_MINER_0); - SetRun(true); - IntroTimer = 4000; - IntroPhase = 1; - break; - case 17: - if (Unit* car = ObjectAccessor::GetCreature(*me, carGUID)) - { - me->SetFacingToObject(car); - car->Relocate(car->GetPositionX(), car->GetPositionY(), me->GetPositionZ() + 1); - car->StopMoving(); - car->RemoveAura(SPELL_CART_DRAG); - } - Talk(SAY_SCARLET_MINER_1); - break; - default: - break; - } - } - - void UpdateAI(uint32 diff) override - { - if (IntroPhase) - { - if (IntroTimer <= diff) - { - if (IntroPhase == 1) - { - if (Creature* car = ObjectAccessor::GetCreature(*me, carGUID)) - DoCast(car, SPELL_CART_DRAG); - IntroTimer = 800; - IntroPhase = 2; - } - else - { - if (Creature* car = ObjectAccessor::GetCreature(*me, carGUID)) - car->AI()->DoAction(0); - IntroPhase = 0; - } - } - else - IntroTimer -= diff; - } - EscortAI::UpdateAI(diff); - } - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_scarlet_minerAI(creature); - } -}; - -// npc 28912 quest 17217 boss 29001 mob 29007 go 191092 - void AddSC_the_scarlet_enclave_c1() { new npc_unworthy_initiate(); @@ -1350,6 +1122,4 @@ void AddSC_the_scarlet_enclave_c1() new npc_dkc1_gothik(); new npc_scarlet_ghoul(); RegisterSpellScript(spell_gift_of_the_harvester); - new npc_scarlet_miner(); - new npc_scarlet_miner_cart(); } |