summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew <47818697+Nyeriah@users.noreply.github.com>2025-09-23 05:44:35 -0300
committerGitHub <noreply@github.com>2025-09-23 10:44:35 +0200
commit42d49d1b6aeb44632cf97dc522ee97569d784692 (patch)
treee4c6cbb79577a75d274c23282453edc324315807
parenta5502ad0bf7e6841dae29773f235c82f63006d50 (diff)
fix(Core/Vehicles): Fix issue with Wyrmrest Vanquisher and other issues with On Ruby Wings (#22989)
-rw-r--r--data/sql/updates/pending_db_world/rev_1758388437618713600.sql18
-rw-r--r--src/server/game/Spells/SpellInfoCorrections.cpp2
-rw-r--r--src/server/scripts/Northrend/zone_dragonblight.cpp62
3 files changed, 82 insertions, 0 deletions
diff --git a/data/sql/updates/pending_db_world/rev_1758388437618713600.sql b/data/sql/updates/pending_db_world/rev_1758388437618713600.sql
new file mode 100644
index 0000000000..4430466c76
--- /dev/null
+++ b/data/sql/updates/pending_db_world/rev_1758388437618713600.sql
@@ -0,0 +1,18 @@
+--
+DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27996);
+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
+(27996, 0, 0, 0, 1, 0, 100, 512, 9000, 9000, 30000, 30000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 21, 10, 0, 0, 0, 0, 0, 0, 0, 'Wyrmrest Vanquisher - Out of Combat - Say Line 0'),
+(27996, 0, 1, 0, 2, 0, 100, 513, 0, 33, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 21, 10, 0, 0, 0, 0, 0, 0, 0, 'Wyrmrest Vanquisher - Between 0-33% Health - Say Line 1 (No Repeat)'),
+(27996, 0, 3, 0, 54, 0, 100, 512, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wyrmrest Vanquisher - On Just Summoned - Set Reactstate Passive'),
+(27996, 0, 4, 5, 28, 0, 100, 512, 0, 0, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 0, 202, 15, 0, 0, 0, 0, 0, 0, 0, 'Wyrmrest Vanquisher - On Passenger Removed - Move To Random Point'),
+(27996, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wyrmrest Vanquisher - On Passenger Removed - Say Line 2'),
+(27996, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 3000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Wyrmrest Vanquisher - On Passenger Removed - Despawn In 3000 ms'),
+(27996, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 134, 44795, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Wyrmrest Vanquisher - On Passenger Removed - Invoker Cast \'Parachute\'');
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` = 2800500 AND `source_type` = 9;
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = 28005) AND (`source_type` = 0) AND (`id` IN (1));
+
+DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_dragonblight_devour_ghoul', 'spell_dragonblight_devour_ghoul_periodic');
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(50430, 'spell_dragonblight_devour_ghoul'),
+(50432, 'spell_dragonblight_devour_ghoul_periodic');
diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp
index e5360809f3..9873af3253 100644
--- a/src/server/game/Spells/SpellInfoCorrections.cpp
+++ b/src/server/game/Spells/SpellInfoCorrections.cpp
@@ -5287,6 +5287,8 @@ void SpellMgr::LoadSpellInfoCorrections()
vse->m_flags &= ~VEHICLE_SEAT_FLAG_PASSENGER_NOT_SELECTABLE;
vse = const_cast<VehicleSeatEntry*>(sVehicleSeatStore.LookupEntry(4693)); // Siege Engine, Accessory
vse->m_flags &= ~VEHICLE_SEAT_FLAG_PASSENGER_NOT_SELECTABLE;
+ vse = const_cast<VehicleSeatEntry*>(sVehicleSeatStore.LookupEntry(1520)); // Wyrmrest Vanquisher
+ vse->m_flags |= VEHICLE_SEAT_FLAG_PASSENGER_NOT_SELECTABLE;
// pussywizard: fix z offset for some vehicles:
vse = const_cast<VehicleSeatEntry*>(sVehicleSeatStore.LookupEntry(6206)); // Marrowgar - Bone Spike
diff --git a/src/server/scripts/Northrend/zone_dragonblight.cpp b/src/server/scripts/Northrend/zone_dragonblight.cpp
index e1f50f3cde..52aac2193b 100644
--- a/src/server/scripts/Northrend/zone_dragonblight.cpp
+++ b/src/server/scripts/Northrend/zone_dragonblight.cpp
@@ -2271,6 +2271,66 @@ private:
}
};
+enum DevourGhoulSpells
+{
+ SPELL_DEVOUR_GHOUL_RIDE_VEHICLE = 50437,
+ SPELL_DEVOUR_PERIODIC = 50432,
+ SPELL_NOURISHMENT = 50443
+};
+
+// 50430 - Devour Ghoul
+class spell_dragonblight_devour_ghoul: public SpellScript
+{
+ PrepareSpellScript(spell_dragonblight_devour_ghoul);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_DEVOUR_GHOUL_RIDE_VEHICLE });
+ }
+
+ void HandleScriptEffect(SpellEffIndex /*effIndex*/)
+ {
+ if (GetCaster())
+ {
+ GetHitUnit()->CastSpell(GetCaster(), SPELL_DEVOUR_GHOUL_RIDE_VEHICLE, true);
+ GetCaster()->CastSpell(GetHitUnit(), SPELL_DEVOUR_PERIODIC, true);
+ }
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_dragonblight_devour_ghoul::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+// 50432 - Devour Ghoul
+class spell_dragonblight_devour_ghoul_periodic : public AuraScript
+{
+ PrepareAuraScript(spell_dragonblight_devour_ghoul_periodic);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_NOURISHMENT });
+ }
+
+ void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE && GetCaster())
+ GetCaster()->CastSpell(GetCaster(), SPELL_NOURISHMENT, true);
+
+ if (GetUnitOwner() && GetUnitOwner()->ToCreature())
+ {
+ GetUnitOwner()->ExitVehicle();
+ GetUnitOwner()->ToCreature()->DespawnOrUnsummon(2000);
+ }
+ }
+
+ void Register() override
+ {
+ OnEffectRemove += AuraEffectRemoveFn(spell_dragonblight_devour_ghoul_periodic::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL);
+ }
+};
+
void AddSC_dragonblight()
{
new npc_conversing_with_the_depths_trigger();
@@ -2299,4 +2359,6 @@ void AddSC_dragonblight()
RegisterSpellScript(spell_dragonblight_corrosive_spit);
RegisterSpellScript(spell_handover_reins);
RegisterSpellScript(spell_dragonblight_flame_fury);
+ RegisterSpellScript(spell_dragonblight_devour_ghoul);
+ RegisterSpellScript(spell_dragonblight_devour_ghoul_periodic);
}