fix(Script/Spell): Gryphon/Wyvern Pet - Mounting Check Aura (#8481)
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1634130715021024000');
|
||||||
|
|
||||||
|
UPDATE `creature_template` SET `unit_flags` = 768, `flags_extra` = `flags_extra`|512 WHERE `entry` IN (36908,36909);
|
||||||
|
DELETE FROM `creature_template_addon` WHERE `entry` IN (36908,36909);
|
||||||
|
INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES
|
||||||
|
(36908,0,0,0,1,0,0,'69641'),
|
||||||
|
(36909,0,0,0,1,0,0,'69641');
|
||||||
|
|
||||||
|
DELETE FROM `spell_script_names` WHERE `spell_id` = 69641 AND `ScriptName` = 'spell_gen_gryphon_wyvern_mount_check';
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||||
|
(69641,'spell_gen_gryphon_wyvern_mount_check');
|
||||||
@@ -38,6 +38,7 @@
|
|||||||
#include "SkillDiscovery.h"
|
#include "SkillDiscovery.h"
|
||||||
#include "SpellAuraEffects.h"
|
#include "SpellAuraEffects.h"
|
||||||
#include "SpellScript.h"
|
#include "SpellScript.h"
|
||||||
|
#include "Unit.h"
|
||||||
#include "Vehicle.h"
|
#include "Vehicle.h"
|
||||||
#include <array>
|
#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
|
enum DalaranDisguiseSpells
|
||||||
{
|
{
|
||||||
SPELL_SUNREAVER_DISGUISE_TRIGGER = 69672,
|
SPELL_SUNREAVER_DISGUISE_TRIGGER = 69672,
|
||||||
@@ -4419,6 +4444,7 @@ void AddSC_generic_spell_scripts()
|
|||||||
RegisterSpellScript(spell_gen_spirit_healer_res);
|
RegisterSpellScript(spell_gen_spirit_healer_res);
|
||||||
RegisterSpellScript(spell_gen_gadgetzan_transporter_backfire);
|
RegisterSpellScript(spell_gen_gadgetzan_transporter_backfire);
|
||||||
RegisterSpellScript(spell_gen_gnomish_transporter);
|
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_sunreaver_disguise");
|
||||||
RegisterSpellScriptWithArgs(spell_gen_dalaran_disguise, "spell_gen_silver_covenant_disguise");
|
RegisterSpellScriptWithArgs(spell_gen_dalaran_disguise, "spell_gen_silver_covenant_disguise");
|
||||||
RegisterSpellScript(spell_gen_elune_candle);
|
RegisterSpellScript(spell_gen_elune_candle);
|
||||||
|
|||||||
Reference in New Issue
Block a user