mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 05:36:23 +00:00
fix(DB/Script): Add various corrections to Massacre At Light's Point event. (#23558)
This commit is contained in:
107
data/sql/updates/pending_db_world/Massacre_lightpoint.sql
Normal file
107
data/sql/updates/pending_db_world/Massacre_lightpoint.sql
Normal file
@@ -0,0 +1,107 @@
|
||||
|
||||
-- Add Waypoints (Scarlet Miner)
|
||||
DELETE FROM `waypoint_data` WHERE (`id` IN (2884100, 2884101));
|
||||
INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES
|
||||
(2884100, 1, 2376.9087, -5906.2495, 108.593, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 2, 2340.1587, -5903.4995, 102.593, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 3, 2306.4087, -5904.7495, 90.593, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 4, 2292.6587, -5917.4995, 82.343, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 5, 2285.6587, -5943.4995, 64.093, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 6, 2271.9087, -5968.4995, 49.843, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 7, 2248.1587, -5978.4995, 36.843, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 8, 2234.6587, -5996.9995, 25.842999, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 9, 2223.4087, -6014.9995, 11.5929985, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 10, 2216.1587, -6035.9995, 7.3429985, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 11, 2195.4087, -6061.2495, 6.3429985, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 12, 2184.4087, -6091.9995, 2.0929985, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 13, 2179.6587, -6120.2495, 1.5929985, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 14, 2175.4087, -6142.9995, 1.5929985, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 15, 2167.9087, -6159.4995, 1.8429985, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 16, 2149.4087, -6161.4995, 1.5929985, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 17, 2134.9087, -6166.2495, 0.8429985, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 18, 2130.9087, -6173.2495, 4.3429985, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 19, 2125.9087, -6180.7495, 10.0929985, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 20, 2123.4087, -6184.7495, 14.0929985, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 21, 2115.9087, -6196.2495, 13.8429985, NULL, 0, 1, 0, 100, 0),
|
||||
(2884100, 22, 2119.1106, -6191.905, 13.275559, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 1, 2376.855, -5906.1553, 108.57493, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 2, 2340.105, -5903.4053, 102.57493, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 3, 2306.855, -5904.9053, 90.57493, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 4, 2292.855, -5917.6553, 82.32493, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 5, 2285.855, -5943.4053, 64.07493, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 6, 2272.105, -5968.4053, 49.82493, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 7, 2248.355, -5978.4053, 36.82493, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 8, 2234.605, -5996.9053, 25.824928, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 9, 2223.605, -6015.1553, 11.574928, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 10, 2216.105, -6035.9053, 7.3249283, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 11, 2195.105, -6059.4053, 6.3249283, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 12, 2184.855, -6087.1553, 3.0749283, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 13, 2180.605, -6119.4053, 1.5749283, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 14, 2177.605, -6149.4053, 1.8249283, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 15, 2188.855, -6170.4053, 1.3249283, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 16, 2213.105, -6165.4053, 1.0749283, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 17, 2241.855, -6160.4053, 2.0749283, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 18, 2269.105, -6163.4053, 2.3249283, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 19, 2269.605, -6168.9053, 2.3249283, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 20, 2270.105, -6174.6553, 5.8249283, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 21, 2270.605, -6180.9053, 9.824928, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 22, 2271.105, -6186.1553, 14.074928, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 23, 2273.855, -6196.4053, 13.824928, NULL, 0, 1, 0, 100, 0),
|
||||
(2884101, 24, 2273.0032, -6191.717, 13.239414, NULL, 0, 1, 0, 100, 0);
|
||||
|
||||
-- Remove Script Names.
|
||||
UPDATE `creature_template` SET `ScriptName` = '' WHERE (`entry` IN (28817, 28833, 28841));
|
||||
UPDATE `gameobject_template` SET `ScriptName` = '' WHERE (`entry` = 190767);
|
||||
|
||||
-- Set spell target position for Mine Car spawn.
|
||||
UPDATE `spell_target_position` SET `PositionX` = 2389.58, `PositionY` = -5901.18, `PositionZ` = 109.02134, `Orientation` = 0 WHERE `ID` = 52462;
|
||||
|
||||
-- Set Unit Flag for Mine Car (immune_to_npc)
|
||||
UPDATE `creature_template` SET `unit_flags` = `unit_flags` |512 WHERE (`entry` = 28817);
|
||||
|
||||
-- Set SmartAI (Mine Car)
|
||||
UPDATE `creature_template` SET `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`, `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
|
||||
(28817, 0, 0, 1, 54, 0, 100, 0, 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 Just Summoned - Morph To Model 25703'),
|
||||
(28817, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 12, 28841, 8, 0, 0, 0, 0, 8, 0, 0, 0, 0, 2382.171, -5899.672, 107.74545, 0, 'Mine Car - On Just Summoned - Summon Creature \'Scarlet Miner\''),
|
||||
(28817, 0, 2, 0, 8, 0, 100, 0, 52465, 0, 0, 0, 0, 0, 29, 3, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Mine Car - On Spellhit \'Drag Mine Cart\' - Start Follow Invoker');
|
||||
|
||||
-- Set SmartAI (Scarlet Miner)
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28841;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 28841);
|
||||
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
|
||||
(28841, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2884100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - On Just Summoned - Run Script'),
|
||||
(28841, 0, 1, 0, 109, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2884101, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - On Path 0 Finished - Run Script');
|
||||
|
||||
-- Set Scarlet Miner Action List
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 9) AND (`entryorguid` IN (2884100, 2884101));
|
||||
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
|
||||
(2884100, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Set Run Off'),
|
||||
(2884100, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 1, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Move To Owner Or Summoner'),
|
||||
(2884100, 9, 2, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Say Line 0'),
|
||||
(2884100, 9, 3, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 11, 52465, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Cast \'Drag Mine Cart\''),
|
||||
(2884100, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Set Run On'),
|
||||
(2884100, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 233, 2884100, 2884101, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Start Random Path 2884100-2884101'),
|
||||
(2884101, 9, 0, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Set Orientation Owner Or Summoner'),
|
||||
(2884101, 9, 1, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Say Line 1'),
|
||||
(2884101, 9, 2, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 28, 52465, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Remove Aura \'Drag Mine Cart\''),
|
||||
(2884101, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Despawn Instant'),
|
||||
(2884101, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Miner - Actionlist - Despawn Instant');
|
||||
|
||||
-- Set SmartAI (Scarlet Fleet Defender)
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28834;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 28834);
|
||||
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
|
||||
(28834, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 3000, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Fleet Defender - On Just Died - Despawn In 3000 ms'),
|
||||
(28834, 0, 1, 0, 0, 0, 100, 0, 1000, 5000, 5000, 8000, 0, 0, 11, 52566, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Fleet Defender - In Combat - Cast \'Shoot\'');
|
||||
|
||||
-- Update SmartAI (Scarlet Cannon)
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28850;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 28850) AND (`source_type` = 0) AND (`id` IN (2));
|
||||
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
|
||||
(28850, 0, 2, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 3000, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Scarlet Land Cannon - On Just Died - Despawn In 3000 ms');
|
||||
@@ -502,49 +502,6 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
class npc_scarlet_cannon : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_scarlet_cannon() : CreatureScript("npc_scarlet_cannon") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_scarlet_cannonAI(creature);
|
||||
}
|
||||
|
||||
struct npc_scarlet_cannonAI : public VehicleAI
|
||||
{
|
||||
npc_scarlet_cannonAI(Creature* creature) : VehicleAI(creature) { summonAttackers = 0; }
|
||||
|
||||
uint32 summonAttackers;
|
||||
void PassengerBoarded(Unit* /*passenger*/, int8 /*seatId*/, bool apply) override
|
||||
{
|
||||
summonAttackers = apply ? 8000 : 0;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
VehicleAI::UpdateAI(diff);
|
||||
|
||||
if (summonAttackers)
|
||||
{
|
||||
summonAttackers += diff;
|
||||
if (summonAttackers >= 15000)
|
||||
{
|
||||
for (uint8 i = 0; i < 15; ++i)
|
||||
if (Creature* summon = me->SummonCreature(28834 /*NPC_SCARLET_FLEET_DEFENDER*/, 2192.56f + irand(-10, 10), -6147.90f + irand(-10, 10), 5.2f, 4.7f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 45000))
|
||||
{
|
||||
summon->SetHomePosition(me->GetHomePosition());
|
||||
summon->AI()->AttackStart(me);
|
||||
}
|
||||
|
||||
summonAttackers = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/*######
|
||||
##Quest 12848
|
||||
######*/
|
||||
@@ -835,253 +792,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/*####
|
||||
## npc_scarlet_miner_cart
|
||||
####*/
|
||||
|
||||
enum Spells_SM
|
||||
{
|
||||
SPELL_CART_CHECK = 54173,
|
||||
SPELL_CART_DRAG = 52465
|
||||
};
|
||||
|
||||
class npc_scarlet_miner_cart : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_scarlet_miner_cart() : CreatureScript("npc_scarlet_miner_cart") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_scarlet_miner_cartAI(creature);
|
||||
}
|
||||
|
||||
struct npc_scarlet_miner_cartAI : public PassiveAI
|
||||
{
|
||||
npc_scarlet_miner_cartAI(Creature* creature) : PassiveAI(creature)
|
||||
{
|
||||
me->SetImmuneToAll(true);
|
||||
me->SetFaction(FACTION_FRIENDLY);
|
||||
me->SetDisplayFromModel(0); // Modelid2 is a horse.
|
||||
}
|
||||
|
||||
ObjectGuid minerGUID;
|
||||
|
||||
void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
|
||||
{
|
||||
minerGUID = guid;
|
||||
}
|
||||
|
||||
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->SetSpeed(MOVE_RUN, 1.25f);
|
||||
|
||||
me->GetMotionMaster()->MoveFollow(miner, 1.0f, 0);
|
||||
me->ReplaceAllUnitFlags(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetImmuneToAll(true);
|
||||
me->SetFaction(FACTION_FRIENDLY);
|
||||
}
|
||||
}
|
||||
|
||||
void PassengerBoarded(Unit* who, int8 /*seatId*/, bool apply) override
|
||||
{
|
||||
who->SetVisible(!apply);
|
||||
if (!apply)
|
||||
if (Creature* miner = ObjectAccessor::GetCreature(*me, minerGUID))
|
||||
miner->DisappearAndDie();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/*####
|
||||
## 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") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_scarlet_minerAI(creature);
|
||||
}
|
||||
|
||||
struct npc_scarlet_minerAI : public npc_escortAI
|
||||
{
|
||||
npc_scarlet_minerAI(Creature* creature) : npc_escortAI(creature)
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
|
||||
uint32 IntroTimer;
|
||||
uint32 IntroPhase;
|
||||
ObjectGuid carGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
carGUID.Clear();
|
||||
IntroTimer = 0;
|
||||
IntroPhase = 0;
|
||||
}
|
||||
|
||||
void InitWaypoint()
|
||||
{
|
||||
AddWaypoint(1, 2389.03f, -5902.74f, 109.014f, 5000);
|
||||
AddWaypoint(2, 2341.812012f, -5900.484863f, 102.619743f);
|
||||
AddWaypoint(3, 2308.34f, -5904.2f, 91.1099f);
|
||||
AddWaypoint(4, 2300.69f, -5912.99f, 86.1572f);
|
||||
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, 2239.79f, -5989.31f, 30.4453f);
|
||||
AddWaypoint(11, 2236.52f, -5994.28f, 27.4829f);
|
||||
AddWaypoint(12, 2232.61f, -6000.23f, 23.1281f);
|
||||
AddWaypoint(13, 2228.69f, -6006.46f, 17.6638f);
|
||||
AddWaypoint(14, 2225.2f, -6012.39f, 12.9487f);
|
||||
AddWaypoint(15, 2217.265625f, -6028.959473f, 7.675705f);
|
||||
AddWaypoint(16, 2202.595947f, -6061.325684f, 5.882018f);
|
||||
AddWaypoint(17, 2188.974609f, -6080.866699f, 3.370027f);
|
||||
|
||||
if (urand(0, 1))
|
||||
{
|
||||
AddWaypoint(18, 2176.483887f, -6110.407227f, 1.855181f);
|
||||
AddWaypoint(19, 2172.516602f, -6146.752441f, 1.074235f);
|
||||
AddWaypoint(20, 2138.918457f, -6158.920898f, 1.342926f);
|
||||
AddWaypoint(21, 2129.866699f, -6174.107910f, 4.380779f);
|
||||
AddWaypoint(22, 2125.250001f, -6181.230001f, 9.91997f);
|
||||
AddWaypoint(23, 2117.709473f, -6193.830078f, 13.3542f, 10000);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddWaypoint(18, 2184.190186f, -6166.447266f, 0.968877f);
|
||||
AddWaypoint(19, 2234.265625f, -6163.741211f, 0.916021f);
|
||||
AddWaypoint(20, 2268.071777f, -6158.750977f, 1.822252f);
|
||||
AddWaypoint(21, 2270.028320f, -6176.505859f, 6.340538f);
|
||||
AddWaypoint(22, 2270.350001f, -6182.410001f, 10.42431f);
|
||||
AddWaypoint(23, 2271.739014f, -6195.401855f, 13.3542f, 10000);
|
||||
}
|
||||
}
|
||||
|
||||
void InitCartQuest(Player* who)
|
||||
{
|
||||
carGUID = who->GetVehicleBase()->GetGUID();
|
||||
InitWaypoint();
|
||||
me->SetWalk(true);
|
||||
Start(false, who->GetGUID());
|
||||
SetDespawnAtFar(false);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 waypointId) override
|
||||
{
|
||||
switch (waypointId)
|
||||
{
|
||||
case 1:
|
||||
if (Unit* car = ObjectAccessor::GetCreature(*me, carGUID))
|
||||
{
|
||||
me->SetFacingToObject(car);
|
||||
// xinef: add some flags
|
||||
car->ReplaceAllUnitFlags(UNIT_FLAG_NON_ATTACKABLE);
|
||||
car->SetImmuneToAll(true);
|
||||
car->SetFaction(FACTION_FRIENDLY);
|
||||
}
|
||||
Talk(SAY_SCARLET_MINER_0);
|
||||
me->SetWalk(false);
|
||||
IntroTimer = 4000;
|
||||
IntroPhase = 1;
|
||||
break;
|
||||
case 23:
|
||||
if (Creature* car = ObjectAccessor::GetCreature(*me, carGUID))
|
||||
{
|
||||
car->SetPosition(car->GetPositionX(), car->GetPositionY(), me->GetPositionZ() + 1, car->GetOrientation());
|
||||
car->StopMovingOnCurrentPos();
|
||||
me->SetFacingToObject(car);
|
||||
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;
|
||||
}
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/*######
|
||||
## go_inconspicuous_mine_car
|
||||
######*/
|
||||
|
||||
enum Spells_Cart
|
||||
{
|
||||
SPELL_CART_SUMM = 52463
|
||||
};
|
||||
|
||||
class go_inconspicuous_mine_car : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_inconspicuous_mine_car() : GameObjectScript("go_inconspicuous_mine_car") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* /*go*/) override
|
||||
{
|
||||
if (player->GetQuestStatus(12701) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
// Hack Why Trinity Dont Support Custom Summon Location
|
||||
if (Creature* miner = player->SummonCreature(28841, 2383.869629f, -5900.312500f, 107.996086f, player->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 1))
|
||||
{
|
||||
player->CastSpell(player, SPELL_CART_SUMM, true);
|
||||
if (Creature* car = player->GetVehicleCreatureBase())
|
||||
{
|
||||
if (car->GetEntry() == 28817)
|
||||
{
|
||||
car->AI()->SetGUID(miner->GetGUID());
|
||||
CAST_AI(npc_scarlet_miner::npc_scarlet_minerAI, miner->AI())->InitCartQuest(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class spell_death_knight_initiate_visual : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_death_knight_initiate_visual);
|
||||
@@ -1219,13 +929,9 @@ void AddSC_the_scarlet_enclave_c1()
|
||||
RegisterSpellScript(spell_q12698_the_gift_that_keeps_on_giving);
|
||||
new npc_scarlet_ghoul();
|
||||
new npc_dkc1_gothik();
|
||||
new npc_scarlet_cannon();
|
||||
new npc_unworthy_initiate();
|
||||
new npc_unworthy_initiate_anchor();
|
||||
new go_acherus_soul_prison();
|
||||
new npc_scarlet_miner();
|
||||
new npc_scarlet_miner_cart();
|
||||
new go_inconspicuous_mine_car();
|
||||
RegisterSpellScript(spell_death_knight_initiate_visual);
|
||||
RegisterSpellScript(spell_lich_king_whisper);
|
||||
RegisterSpellScript(spell_lich_king_vo_blocker);
|
||||
|
||||
Reference in New Issue
Block a user