mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 17:19:07 +00:00
fix(Script/Spell): Gryphon/Wyvern Pet - Mounting Check Aura (#8481)
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#include "SkillDiscovery.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellScript.h"
|
||||
#include "Unit.h"
|
||||
#include "Vehicle.h"
|
||||
#include <array>
|
||||
|
||||
@@ -2619,6 +2620,30 @@ class spell_gen_gnomish_transporter : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
// 69641 - Gryphon/Wyvern Pet - Mounting Check Aura
|
||||
class spell_gen_gryphon_wyvern_mount_check : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_gen_gryphon_wyvern_mount_check);
|
||||
|
||||
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
Unit* owner = target->GetOwner();
|
||||
|
||||
if (!owner)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
target->SetDisableGravity(owner->IsMounted());
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_gen_gryphon_wyvern_mount_check::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
enum DalaranDisguiseSpells
|
||||
{
|
||||
SPELL_SUNREAVER_DISGUISE_TRIGGER = 69672,
|
||||
@@ -4419,6 +4444,7 @@ void AddSC_generic_spell_scripts()
|
||||
RegisterSpellScript(spell_gen_spirit_healer_res);
|
||||
RegisterSpellScript(spell_gen_gadgetzan_transporter_backfire);
|
||||
RegisterSpellScript(spell_gen_gnomish_transporter);
|
||||
RegisterSpellScript(spell_gen_gryphon_wyvern_mount_check);
|
||||
RegisterSpellScriptWithArgs(spell_gen_dalaran_disguise, "spell_gen_sunreaver_disguise");
|
||||
RegisterSpellScriptWithArgs(spell_gen_dalaran_disguise, "spell_gen_silver_covenant_disguise");
|
||||
RegisterSpellScript(spell_gen_elune_candle);
|
||||
|
||||
Reference in New Issue
Block a user