From 6c48841e9753ccb6668f7d72fd2cc0f5c79dabbc Mon Sep 17 00:00:00 2001 From: blinkysc <37940565+blinkysc@users.noreply.github.com> Date: Tue, 30 Jun 2026 11:19:10 -0500 Subject: [PATCH] fix(DB/Quest): Aces High! quest issues (#23924) Co-authored-by: blinkysc Co-authored-by: Gultask <100873791+Gultask@users.noreply.github.com> Co-authored-by: bench Co-authored-by: sogladev --- .../rev_1764209012421370939.sql | 26 +++++++++++++++++++ src/server/game/Entities/Vehicle/Vehicle.cpp | 6 ++--- src/server/scripts/Spells/spell_quest.cpp | 24 +++++++++++++++++ 3 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1764209012421370939.sql diff --git a/data/sql/updates/pending_db_world/rev_1764209012421370939.sql b/data/sql/updates/pending_db_world/rev_1764209012421370939.sql new file mode 100644 index 0000000000..61c2307c2f --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1764209012421370939.sql @@ -0,0 +1,26 @@ +-- Fix Aces High! quest issues (https://github.com/azerothcore/azerothcore-wotlk/issues/23834) + +-- 1. Update Wyrmrest Skytalon (32535) spells per sniff (build 46368) +-- Update VerifiedBuild for confirmed spells, add missing Blazing Speed, remove Flight aura (57403) +UPDATE `creature_template_spell` SET `VerifiedBuild` = 46368 WHERE `CreatureID` = 32535 AND `Index` IN (0, 1, 2, 3, 4); +DELETE FROM `creature_template_spell` WHERE `CreatureID` = 32535 AND `Index` IN (5, 6); +INSERT INTO `creature_template_spell` (`CreatureID`, `Index`, `Spell`, `VerifiedBuild`) VALUES +(32535, 5, 57092, 46368); -- Blazing Speed +-- Add 57403 Flight aura +UPDATE `creature_template_addon` SET `auras` = '57403' WHERE (`entry` = 32535); + +-- 2. Set Scalesworn Elite (32534) to use SmartAI for combat abilities +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 32534; + +-- 3. Add SmartAI scripts for Scalesworn Elite to cast Ice Shard (61269) and Arcane Surge (61272) +DELETE FROM `smart_scripts` WHERE `entryorguid` = 32534 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`, `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 +(32534, 0, 0, 0, 0, 0, 100, 0, 1000, 2000, 2000, 3000, 0, 0, 11, 61269, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Scalesworn Elite - In Combat - Cast Ice Shard'), +(32534, 0, 1, 0, 0, 0, 100, 0, 8000, 12000, 15000, 20000, 0, 0, 11, 61272, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Scalesworn Elite - In Combat - Cast Arcane Surge'); + +-- 4. Fix Corastrasza SmartAI to cast ride periodic on player (target_type 7) instead of self (target_type 1) +UPDATE `smart_scripts` SET `target_type` = 7 WHERE `entryorguid` = 32548 AND `source_type` = 0 AND `id` = 3; + +-- 5. Register Wyrmrest Skytalon Ride Periodic spell script (fixes auto-mount) +DELETE FROM `spell_script_names` WHERE `spell_id` = 61244; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (61244, 'spell_q13413_wyrmrest_skytalon_ride_periodic'); diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp index ca4b21f6d7..a0912c7d0d 100644 --- a/src/server/game/Entities/Vehicle/Vehicle.cpp +++ b/src/server/game/Entities/Vehicle/Vehicle.cpp @@ -501,8 +501,8 @@ void Vehicle::RemovePassenger(Unit* unit) seat->second.Passenger.Reset(); - // RemoveCharmedBy() clears MOVEMENTFLAG_FLYING, so cache this before uncharm. - bool wasFlying = _me->IsFlying(); + // RemoveCharmedBy() clears flying movement state, so cache this before uncharm. + bool canFly = _me->IsFlying() || _me->HasUnitMovementFlag(MOVEMENTFLAG_CAN_FLY) || _me->HasAuraType(SPELL_AURA_FLY); if (_me->IsCreature() && unit->IsPlayer() && seat->second.SeatInfo->m_flags & VEHICLE_SEAT_FLAG_CAN_CONTROL) _me->RemoveCharmedBy(unit); @@ -519,7 +519,7 @@ void Vehicle::RemovePassenger(Unit* unit) } // only for flyable vehicles - if (wasFlying && !_me->GetInstanceId() && unit->IsPlayer() && !(unit->ToPlayer()->GetDelayedOperations() & DELAYED_VEHICLE_TELEPORT) && _me->GetEntry() != 30275 /*NPC_WILD_WYRM*/) + if (canFly && !_me->GetInstanceId() && unit->IsPlayer() && !(unit->ToPlayer()->GetDelayedOperations() & DELAYED_VEHICLE_TELEPORT) && _me->GetEntry() != 30275 /*NPC_WILD_WYRM*/) _me->CastSpell(unit, VEHICLE_SPELL_PARACHUTE, true); if (_me->IsCreature()) diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 65596dd4ab..020e610499 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -2512,6 +2512,29 @@ class spell_q9847_a_spirit_ally : public SpellScript } }; +enum WyrmrestSkytalon +{ + NPC_WYRMREST_SKYTALON = 32535 +}; + +class spell_q13413_wyrmrest_skytalon_ride_periodic : public AuraScript +{ + PrepareAuraScript(spell_q13413_wyrmrest_skytalon_ride_periodic); + + void HandlePeriodic(AuraEffect const* aurEff) + { + PreventDefaultAction(); + if (Unit* target = GetTarget()) + if (Creature* skytalon = target->FindNearestCreature(NPC_WYRMREST_SKYTALON, 20.0f)) + target->CastSpell(skytalon, GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell, true); + } + + void Register() override + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_q13413_wyrmrest_skytalon_ride_periodic::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); + } +}; + void AddSC_quest_spell_scripts() { RegisterSpellScript(spell_q5561_kodo_roundup_kodo_kombobulator); @@ -2585,4 +2608,5 @@ void AddSC_quest_spell_scripts() RegisterSpellScript(spell_q4735_collect_rookery_egg); RegisterSpellScript(spell_q10651_q10692_book_of_fel_names); RegisterSpellScript(spell_q9847_a_spirit_ally); + RegisterSpellScript(spell_q13413_wyrmrest_skytalon_ride_periodic); }