diff --git a/data/sql/updates/pending_db_world/rev_1786235651000000000.sql b/data/sql/updates/pending_db_world/rev_1786235651000000000.sql new file mode 100644 index 0000000000..52abcdf59b --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1786235651000000000.sql @@ -0,0 +1,16 @@ +-- Leviroth is IMMUNE_TO_PC, so it cannot be pulled before the trident and the 7.5 +-- DamageModifier on its template was never meant to be there. Fixing the template +-- and moving the self-impale to SmartAI makes the spell script unnecessary. +UPDATE `creature_template` SET `DamageModifier` = 1, `flags_extra` = `flags_extra`|2097152, `RegenHealth` = 0 WHERE (`entry` = 26452); + +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 26452; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 26452); +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 +(26452, 0, 0, 1, 8, 0, 100, 0, 47170, 0, 0, 0, 0, 0, 11, 49882, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Leviroth - On Spellhit \'Impale Leviroth\' - Cast \'Leviroth Self-Impale\''), +(26452, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 46767, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Leviroth - On Spellhit \'Impale Leviroth\' - Cast \'Cosmetic - Underwater Blood\''), +(26452, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 19, 256, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Leviroth - On Spellhit \'Impale Leviroth\' - Remove Flags Immune To Players'), +(26452, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Leviroth - On Spellhit \'Impale Leviroth\' - Start Attacking'), +(26452, 0, 4, 0, 7, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 30, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Leviroth - On Evade - Despawn Instant'); + +DELETE FROM `spell_script_names` WHERE `spell_id` = 47170 AND `ScriptName` = 'spell_item_impale_leviroth'; +UPDATE `conditions` SET `Comment` = 'SpellID - 47170 Impale Leviroth only targets Leviroth (26452)' WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 47170) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 31) AND (`ConditionTarget` = 0) AND (`ConditionValue1` = 3) AND (`ConditionValue2` = 26452) AND (`ConditionValue3` = 0); diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 3f2a0babca..57c7299de3 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -3313,41 +3313,6 @@ class spell_item_complete_raptor_capture : public SpellScript } }; -enum ImpaleLeviroth -{ - NPC_LEVIROTH = 26452, - SPELL_LEVIROTH_SELF_IMPALE = 49882, -}; - -class spell_item_impale_leviroth : public SpellScript -{ - PrepareSpellScript(spell_item_impale_leviroth); - - bool Validate(SpellInfo const* /*spell*/) override - { - if (!sObjectMgr->GetCreatureTemplate(NPC_LEVIROTH)) - return false; - return true; - } - - void HandleDummy(SpellEffIndex /* effIndex */) - { - if (Creature* target = GetHitCreature()) - if (target->GetEntry() == NPC_LEVIROTH && target->HealthAbovePct(94)) - { - target->CastSpell(target, SPELL_LEVIROTH_SELF_IMPALE, true); - target->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, 150); - target->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, 200); - target->LowerPlayerDamageReq(target->GetMaxHealth()); - } - } - - void Register() override - { - OnEffectHitTarget += SpellEffectFn(spell_item_impale_leviroth::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); - } -}; - enum BrewfestMountTransformation { SPELL_MOUNT_RAM_100 = 43900, @@ -6183,7 +6148,6 @@ void AddSC_item_spell_scripts() RegisterSpellScript(spell_item_socrethars_stone); RegisterSpellScript(spell_item_demon_broiled_surprise); RegisterSpellScript(spell_item_complete_raptor_capture); - RegisterSpellScript(spell_item_impale_leviroth); RegisterSpellScript(spell_item_brewfest_mount_transformation); RegisterSpellScript(spell_item_nitro_boots); RegisterSpellScript(spell_item_teach_language);