fix(DB/Quest): Aces High! quest issues (#23924)

Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
Co-authored-by: Gultask <100873791+Gultask@users.noreply.github.com>
Co-authored-by: bench <heyitsbench@users.noreply.github.com>
Co-authored-by: sogladev <sogladev@gmail.com>
This commit is contained in:
blinkysc
2026-06-30 11:19:10 -05:00
committed by GitHub
parent 2945514f45
commit 6c48841e97
3 changed files with 53 additions and 3 deletions

View File

@@ -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())

View File

@@ -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);
}