aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/master/2021_12_20_33_world_2020_01_26_03_world.sql33
-rw-r--r--src/server/scripts/Northrend/zone_borean_tundra.cpp131
-rw-r--r--src/server/scripts/World/item_scripts.cpp22
3 files changed, 33 insertions, 153 deletions
diff --git a/sql/updates/world/master/2021_12_20_33_world_2020_01_26_03_world.sql b/sql/updates/world/master/2021_12_20_33_world_2020_01_26_03_world.sql
new file mode 100644
index 00000000000..8f0ed84e28e
--- /dev/null
+++ b/sql/updates/world/master/2021_12_20_33_world_2020_01_26_03_world.sql
@@ -0,0 +1,33 @@
+UPDATE `creature_template` SET `ScriptName`='',`AIName`='SmartAI' WHERE `entry` IN (26248,26249);
+UPDATE `creature_template` SET `unit_flags`=768 WHERE `entry`=26250;
+
+DELETE FROM `item_script_names` WHERE `ScriptName`='item_incendiary_explosives';
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=46797;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(17,0,46797,0,0,29,0,26248,15,0,0,0,0,'','Spell \'Set Explosives Cart\' can be used within 15 yards of Northern Sinkhole'),
+(17,0,46797,0,1,29,0,26249,15,0,0,0,0,'','Spell \'Set Explosives Cart\' can be used within 15 yards of Southern Sinkhole');
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (26248,26249) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (2624800,2624900) AND `source_type`=9;
+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
+(26248,0,0,0,8,0,100,0,46797,0,9000,9000,0,80,2624800,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Northern Sinkhole - On spellhit - Action list'),
+(2624800,9,0,0,0,0,100,0,0,0,0,0,0,33,26248,0,0,0,0,0,7,0,0,0,0,0,0,0,0,'Northern Sinkhole - Action list - Kill credit'),
+(2624800,9,1,0,0,0,100,0,0,0,0,0,0,11,46798,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Northern Sinkhole - Action list - Cast \'Summon Explosives Cart\''),
+(2624800,9,2,0,0,0,100,0,4000,4000,0,0,0,11,46799,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Northern Sinkhole - Action list - Cast \'Summon Explosives Cart - Fire\''),
+(2624800,9,3,0,0,0,100,0,1000,1000,0,0,0,9,0,0,0,0,0,0,20,188160,0,0,0,0,0,0,0,'Northern Sinkhole - Action list - Activate Explosives Cart - Fire'),
+(2624800,9,4,0,0,0,100,0,1000,1000,0,0,0,11,42445,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Northern Sinkhole - Action list - Cast \'Cannon Fire\''),
+(2624800,9,5,0,0,0,100,0,1000,1000,0,0,0,11,46225,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Northern Sinkhole - Action list - Cast \'Huge Explosion\''),
+(2624800,9,6,0,0,0,100,0,500,500,0,0,0,11,46800,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Northern Sinkhole - Action list - Cast \'Summon Scourged Burrower\''),
+(2624800,9,7,0,0,0,100,0,1000,1000,0,0,0,51,0,0,0,0,0,0,19,26250,3,0,0,0,0,0,0,'Northern Sinkhole - Action list - Kill Scourged Burrower'),
+(2624800,9,8,0,0,0,100,0,0,0,0,0,0,41,0,0,0,0,0,0,20,188160,0,0,0,0,0,0,0,'Northern Sinkhole - Action list - Despawn Explosives Cart - Fire'),
+
+(26249,0,0,0,8,0,100,0,46797,0,9000,9000,0,80,2624900,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Southern Sinkhole - On spellhit - Action list'),
+(2624900,9,0,0,0,0,100,0,0,0,0,0,0,33,26249,0,0,0,0,0,7,0,0,0,0,0,0,0,0,'Southern Sinkhole - Action list - Kill credit'),
+(2624900,9,1,0,0,0,100,0,0,0,0,0,0,11,46798,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Southern Sinkhole - Action list - Cast \'Summon Explosives Cart\''),
+(2624900,9,2,0,0,0,100,0,4000,4000,0,0,0,11,46799,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Southern Sinkhole - Action list - Cast \'Summon Explosives Cart - Fire\''),
+(2624900,9,3,0,0,0,100,0,1000,1000,0,0,0,9,0,0,0,0,0,0,20,188160,0,0,0,0,0,0,0,'Southern Sinkhole - Action list - Activate Explosives Cart'),
+(2624900,9,4,0,0,0,100,0,1000,1000,0,0,0,11,42445,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Southern Sinkhole - Action list - Cast \'Cannon Fire\''),
+(2624900,9,5,0,0,0,100,0,1000,1000,0,0,0,11,46225,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Southern Sinkhole - Action list - Cast \'Huge Explosion\''),
+(2624900,9,6,0,0,0,100,0,500,500,0,0,0,11,46800,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Southern Sinkhole - Action list - Cast \'Summon Scourged Burrower\''),
+(2624900,9,7,0,0,0,100,0,1000,1000,0,0,0,51,0,0,0,0,0,0,19,26250,3,0,0,0,0,0,0,'Southern Sinkhole - Action list - Kill Scourged Burrower'),
+(2624900,9,8,0,0,0,100,0,0,0,0,0,0,41,0,0,0,0,0,0,20,188160,0,0,0,0,0,0,0,'Southern Sinkhole - Action list - Despawn Explosives Cart');
diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp
index 12963a4e563..37d56652122 100644
--- a/src/server/scripts/Northrend/zone_borean_tundra.cpp
+++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp
@@ -34,136 +34,6 @@
#include "WorldSession.h"
/*######
-## npc_sinkhole_kill_credit
-######*/
-
-enum Sinkhole
-{
- GO_EXPLOSIVES_CART = 188160,
- NPC_SCOURGED_BURROWER = 26250,
- QUEST_PLUG_THE_SINKHOLES = 11897,
- SPELL_SET_CART = 46797,
- SPELL_EXPLODE_CART = 46799,
- SPELL_SUMMON_CART = 46798,
- SPELL_SUMMON_WORM = 46800
-};
-
-class npc_sinkhole_kill_credit : public CreatureScript
-{
-public:
- npc_sinkhole_kill_credit() : CreatureScript("npc_sinkhole_kill_credit") { }
-
- struct npc_sinkhole_kill_creditAI : public ScriptedAI
- {
- npc_sinkhole_kill_creditAI(Creature* creature) : ScriptedAI(creature)
- {
- Initialize();
- }
-
- void Initialize()
- {
- phaseTimer = 500;
- phase = 0;
- casterGuid.Clear();
- }
-
- uint32 phaseTimer;
- uint8 phase;
- ObjectGuid casterGuid;
-
- void Reset() override
- {
- Initialize();
- }
-
- void SpellHit(Unit* caster, SpellInfo const* spell) override
- {
- if (phase || spell->Id != SPELL_SET_CART)
- return;
-
- Player* player = caster->ToPlayer();
- if (player && player->GetQuestStatus(QUEST_PLUG_THE_SINKHOLES) == QUEST_STATUS_INCOMPLETE)
- {
- phase = 1;
- casterGuid = caster->GetGUID();
- }
- }
-
- void JustEngagedWith(Unit* /*who*/) override { }
-
- void UpdateAI(uint32 diff) override
- {
- if (!phase)
- return;
-
- if (phaseTimer <= diff)
- {
- switch (phase)
- {
- case 1:
- DoCast(me, SPELL_EXPLODE_CART, true);
- DoCast(me, SPELL_SUMMON_CART, true);
- if (GameObject* cart = me->FindNearestGameObject(GO_EXPLOSIVES_CART, 3.0f))
- cart->SetFaction(FACTION_MONSTER);
- phaseTimer = 3000;
- phase = 2;
- break;
- case 2:
- if (GameObject* cart = me->FindNearestGameObject(GO_EXPLOSIVES_CART, 3.0f))
- cart->UseDoorOrButton();
- DoCast(me, SPELL_EXPLODE_CART, true);
- phaseTimer = 3000;
- phase = 3;
- break;
- case 3:
- DoCast(me, SPELL_EXPLODE_CART, true);
- phaseTimer = 2000;
- phase = 5; // @fixme: phase 4 is missing...
- break;
- case 5:
- DoCast(me, SPELL_SUMMON_WORM, true);
- if (Unit* worm = me->FindNearestCreature(NPC_SCOURGED_BURROWER, 3.0f))
- {
- worm->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
- worm->HandleEmoteCommand(EMOTE_ONESHOT_EMERGE);
- }
- phaseTimer = 1000;
- phase = 6;
- break;
- case 6:
- DoCast(me, SPELL_EXPLODE_CART, true);
- if (Unit* worm = me->FindNearestCreature(NPC_SCOURGED_BURROWER, 3.0f))
- {
- Unit::Kill(me, worm);
- worm->RemoveDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
- }
- phaseTimer = 2000;
- phase = 7;
- break;
- case 7:
- DoCast(me, SPELL_EXPLODE_CART, true);
- if (Player* caster = ObjectAccessor::GetPlayer(*me, casterGuid))
- caster->KilledMonster(me->GetCreatureTemplate(), me->GetGUID());
- phaseTimer = 5000;
- phase = 8;
- break;
- case 8:
- EnterEvadeMode();
- break;
- }
- } else phaseTimer -= diff;
-
- }
-
- };
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new npc_sinkhole_kill_creditAI(creature);
- }
-};
-
-/*######
## npc_khunok_the_behemoth
######*/
@@ -2470,7 +2340,6 @@ class spell_q11653_shortening_blaster : public SpellScript
void AddSC_borean_tundra()
{
- new npc_sinkhole_kill_credit();
new npc_khunok_the_behemoth();
new npc_corastrasza();
new npc_iruk();
diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp
index 78e8c2b3498..61bf411c03c 100644
--- a/src/server/scripts/World/item_scripts.cpp
+++ b/src/server/scripts/World/item_scripts.cpp
@@ -129,27 +129,6 @@ public:
};
/*#####
-# item_incendiary_explosives
-#####*/
-
-class item_incendiary_explosives : public ItemScript
-{
-public:
- item_incendiary_explosives() : ItemScript("item_incendiary_explosives") { }
-
- bool OnUse(Player* player, Item* item, SpellCastTargets const& /*targets*/, ObjectGuid /*castId*/) override
- {
- if (player->FindNearestCreature(26248, 15) || player->FindNearestCreature(26249, 15))
- return false;
- else
- {
- player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, item, nullptr);
- return true;
- }
- }
-};
-
-/*#####
# item_mysterious_egg
#####*/
@@ -349,7 +328,6 @@ void AddSC_item_scripts()
new item_only_for_flight();
new item_nether_wraith_beacon();
new item_gor_dreks_ointment();
- new item_incendiary_explosives();
new item_mysterious_egg();
new item_disgusting_jar();
new item_petrov_cluster_bombs();