aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoroffl <offl@users.noreply.github.com>2022-03-08 03:19:35 +0200
committeroffl <offl@users.noreply.github.com>2022-03-08 03:19:35 +0200
commit877b3674d90482d40a020e3df7a802e297be714e (patch)
treeb3aac3279699dc76c690762d09de412d00699dde
parenta29476b92ef350ba7612b08aa885f921b612eb2f (diff)
DB/Quest: Update 'Stopping the Spread'
-rw-r--r--sql/updates/world/3.3.5/2022_03_08_00_world.sql15
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp35
2 files changed, 15 insertions, 35 deletions
diff --git a/sql/updates/world/3.3.5/2022_03_08_00_world.sql b/sql/updates/world/3.3.5/2022_03_08_00_world.sql
new file mode 100644
index 00000000000..fbc972b9d6a
--- /dev/null
+++ b/sql/updates/world/3.3.5/2022_03_08_00_world.sql
@@ -0,0 +1,15 @@
+-- Dummy aura of 32146 with 1s duration and TARGET_UNIT_CASTER may be used to force caster cast 32147 (TARGET_DEST_NEARBY_ENTRY),
+-- they scripts auras like that. However, usually to remove aura or cast spell on player. And this case is different because there's also
+-- 39189 and it's a copy of 32146 but it summons creature via 39191 (TARGET_DEST_CASTER) and not object. It more looks like it's scripted
+-- directly in creature script.
+-- Probably they just copied 32146 to make 39189, but changed implementation and didn't bothered to remove dummy aura effect of 39189. Or
+-- maybe TARGET_DEST_NEARBY_ENTRY of 32147 is a typo, who knows. There's not too much options to think of what exactly dummy auras does.
+-- We'll cast 32147 directly in creature script for now
+UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 18240;
+DELETE FROM `smart_scripts` WHERE `entryorguid` = 18240 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`,`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
+(18240,0,0,1,8,0,100,1,32146,0,0,0,0,33,18240,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Sunspring Villager - On Spellhit 'Liquid Fire' - Quest Credit 'Stopping the Spread' (No Repeat)"),
+(18240,0,1,2,61,0,100,0,0,0,0,0,0,11,32147,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Sunspring Villager - On Spellhit 'Liquid Fire' - Cast 'Ignite Corpse'"),
+(18240,0,2,0,61,0,100,0,0,0,0,0,0,41,7000,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Sunspring Villager - On Spellhit 'Liquid Fire' - Delayed Despawn");
+
+DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_q9874_liquid_fire';
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index 71c9589438c..9659956b249 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -619,40 +619,6 @@ class spell_q12659_ahunaes_knife : public SpellScript
}
};
-enum StoppingTheSpread
-{
- NPC_VILLAGER_KILL_CREDIT = 18240,
- SPELL_FLAMES = 39199
-};
-
-// 32146 - Liquid Fire
-class spell_q9874_liquid_fire : public SpellScript
-{
- PrepareSpellScript(spell_q9874_liquid_fire);
-
- bool Load() override
- {
- return GetCaster()->GetTypeId() == TYPEID_PLAYER;
- }
-
- void HandleDummy(SpellEffIndex /*effIndex*/)
- {
- Player* caster = GetCaster()->ToPlayer();
- if (Creature* target = GetHitCreature())
- if (!target->HasAura(SPELL_FLAMES))
- {
- caster->KilledMonsterCredit(NPC_VILLAGER_KILL_CREDIT);
- target->CastSpell(target, SPELL_FLAMES, true);
- target->DespawnOrUnsummon(60s);
- }
- }
-
- void Register() override
- {
- OnEffectHitTarget += SpellEffectFn(spell_q9874_liquid_fire::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
- }
-};
-
enum SalvagingLifesStength
{
NPC_SHARD_KILL_CREDIT = 29303,
@@ -2049,7 +2015,6 @@ void AddSC_quest_spell_scripts()
RegisterSpellScript(spell_q12634_despawn_fruit_tosser);
RegisterSpellScript(spell_q12851_going_bearback);
RegisterSpellScript(spell_q12659_ahunaes_knife);
- RegisterSpellScript(spell_q9874_liquid_fire);
RegisterSpellScript(spell_q12805_lifeblood_dummy);
RegisterSpellScript(spell_q13280_13283_plant_battle_standard);
RegisterSpellScript(spell_q13280_13283_jump_jets);