fix(Scripts/Spells): Fix Isle of Queldanas Orb of Translocation (#21325)
This commit is contained in:
parent
8af593bda9
commit
be422f2f2a
@ -0,0 +1,8 @@
|
||||
--
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id` IN (45370, 45367);
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(45370, 'spell_gen_translocate_down'),
|
||||
(45367, 'spell_gen_translocate_up');
|
||||
|
||||
UPDATE `conditions` SET `ConditionValue2` = 187428, `Comment` = 'Translocation (Up)' WHERE `SourceEntry` = 45368 AND `SourceTypeOrReferenceId` = 13;
|
||||
UPDATE `conditions` SET `ConditionValue2` = 187431, `Comment` = 'Translocation (Down)' WHERE `SourceEntry` = 45371 AND `SourceTypeOrReferenceId` = 13;
|
||||
@ -5400,6 +5400,38 @@ class spell_gen_proc_on_victim : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
enum TranslocateSpells
|
||||
{
|
||||
SPELL_TRANSLOCATION_DOWN = 45368,
|
||||
SPELL_TRANSLOCATION_UP = 45371
|
||||
};
|
||||
|
||||
class spell_gen_translocate : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_gen_translocate);
|
||||
|
||||
public:
|
||||
spell_gen_translocate(uint32 spellId) : SpellScript(), _spellId(spellId) {}
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ _spellId });
|
||||
}
|
||||
|
||||
void HandleScript()
|
||||
{
|
||||
GetCaster()->CastSpell(GetCaster(), _spellId);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AfterCast += SpellCastFn(spell_gen_translocate::HandleScript);
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 _spellId;
|
||||
};
|
||||
|
||||
void AddSC_generic_spell_scripts()
|
||||
{
|
||||
RegisterSpellScript(spell_silithyst);
|
||||
@ -5560,4 +5592,6 @@ void AddSC_generic_spell_scripts()
|
||||
RegisterSpellScript(spell_gen_set_health);
|
||||
RegisterSpellScript(spell_pet_spellhit_expertise_spellpen_scaling);
|
||||
RegisterSpellScript(spell_gen_proc_on_victim);
|
||||
RegisterSpellScriptWithArgs(spell_gen_translocate, "spell_gen_translocate_down", SPELL_TRANSLOCATION_DOWN);
|
||||
RegisterSpellScriptWithArgs(spell_gen_translocate, "spell_gen_translocate_up", SPELL_TRANSLOCATION_UP);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user