manually play JumpStart, Hover, JumpEnd in a script.
Trinitycore ? Spellid please (I know it's custom).
// 70150 - Dragoon Spellsenum DragoonLeap{ SPELL_DRA_LEAP = 70150, ANIM_JUMP_START = 27, ANIM_JUMP_END = 29};class spell_dra_leap : public SpellScriptLoader{public: spell_dra_leap() : SpellScriptLoader("spell_dra_leap") { } class spell_dra_leap_SpellScript : public SpellScript { PrepareSpellScript(spell_dra_leap_SpellScript); void OnCastAnim() { Unit* caster = GetCaster(); if (caster) { caster->SetHover(true); caster->HandleEmoteCommand(ANIM_JUMP_START); } } void OnHitAnim() { Unit* caster = GetCaster(); if (caster) { caster->HandleEmoteCommand(ANIM_JUMP_END); caster->SetHover(false); } } void Register() override { OnCast += SpellCastFn(spell_dra_leap_SpellScript::OnCastAnim); OnHit += SpellHitFn(spell_dra_leap_SpellScript::OnHitAnim); } }; SpellScript* GetSpellScript() const override { return new spell_dra_leap_SpellScript(); }};
On Trinity, it would be something like this. Note, just a rough draft and I am not even sure if this works.Code: [Select]// 70150 - Dragoon Spellsenum DragoonLeap{ SPELL_DRA_LEAP = 70150, ANIM_JUMP_START = 27, ANIM_JUMP_END = 29};class spell_dra_leap : public SpellScriptLoader{public: spell_dra_leap() : SpellScriptLoader("spell_dra_leap") { } class spell_dra_leap_SpellScript : public SpellScript { PrepareSpellScript(spell_dra_leap_SpellScript); void OnCastAnim() { Unit* caster = GetCaster(); if (caster) { caster->SetHover(true); caster->HandleEmoteCommand(ANIM_JUMP_START); } } void OnHitAnim() { Unit* caster = GetCaster(); if (caster) { caster->HandleEmoteCommand(ANIM_JUMP_END); caster->SetHover(false); } } void Register() override { OnCast += SpellCastFn(spell_dra_leap_SpellScript::OnCastAnim); OnHit += SpellHitFn(spell_dra_leap_SpellScript::OnHitAnim); } }; SpellScript* GetSpellScript() const override { return new spell_dra_leap_SpellScript(); }};EDIT: And please don't forget to set spellscript for spell....
Quote from: "Ascathos"On Trinity, it would be something like this. Note, just a rough draft and I am not even sure if this works.Code: [Select]// 70150 - Dragoon Spellsenum DragoonLeap{ SPELL_DRA_LEAP = 70150, ANIM_JUMP_START = 27, ANIM_JUMP_END = 29};class spell_dra_leap : public SpellScriptLoader{public: spell_dra_leap() : SpellScriptLoader("spell_dra_leap") { } class spell_dra_leap_SpellScript : public SpellScript { PrepareSpellScript(spell_dra_leap_SpellScript); void OnCastAnim() { Unit* caster = GetCaster(); if (caster) { caster->SetHover(true); caster->HandleEmoteCommand(ANIM_JUMP_START); } } void OnHitAnim() { Unit* caster = GetCaster(); if (caster) { caster->HandleEmoteCommand(ANIM_JUMP_END); caster->SetHover(false); } } void Register() override { OnCast += SpellCastFn(spell_dra_leap_SpellScript::OnCastAnim); OnHit += SpellHitFn(spell_dra_leap_SpellScript::OnHitAnim); } }; SpellScript* GetSpellScript() const override { return new spell_dra_leap_SpellScript(); }};EDIT: And please don't forget to set spellscript for spell....Any idea if this would work on mangos? and if so, where would I put it?