mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-01 22:56:39 +01:00
DB/Quest: Update 'Stopping the Spread'
This commit is contained in:
15
sql/updates/world/3.3.5/2022_03_08_00_world.sql
Normal file
15
sql/updates/world/3.3.5/2022_03_08_00_world.sql
Normal file
@@ -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';
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user