mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Scripts/Scarlet Enclave: Stable Master Kitrik's spell Repo (#23023)
(cherry picked from commit f0f4d0280d)
This commit is contained in:
@@ -780,6 +780,34 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
enum HorseSeats
|
||||
{
|
||||
SEAT_ID_0 = 0
|
||||
};
|
||||
|
||||
class spell_stable_master_repo : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_stable_master_repo);
|
||||
|
||||
void AfterApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Creature* creature = GetTarget()->ToCreature();
|
||||
if (!creature)
|
||||
return;
|
||||
|
||||
if (Vehicle* vehicleKit = creature->GetVehicleKit())
|
||||
if (Unit* passenger = vehicleKit->GetPassenger(SEAT_ID_0))
|
||||
GetCaster()->EngageWithTarget(passenger);
|
||||
|
||||
creature->DespawnOrUnsummon(1s);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AfterEffectApply += AuraEffectApplyFn(spell_stable_master_repo::AfterApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_deliver_stolen_horse : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_deliver_stolen_horse);
|
||||
@@ -1218,6 +1246,7 @@ void AddSC_the_scarlet_enclave_c1()
|
||||
new npc_death_knight_initiate();
|
||||
RegisterCreatureAI(npc_dark_rider_of_acherus);
|
||||
new npc_salanar_the_horseman();
|
||||
RegisterAuraScript(spell_stable_master_repo);
|
||||
RegisterSpellScript(spell_deliver_stolen_horse);
|
||||
new npc_ros_dark_rider();
|
||||
new npc_dkc1_gothik();
|
||||
|
||||
Reference in New Issue
Block a user