This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [QUESTION] "Leap" Animation  (Read 1677 times)

nothawthorne

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 14
    • View Profile
    • http://theshardofentropy.ddns.net/
[QUESTION] "Leap" Animation
« on: September 29, 2014, 05:44:28 am »
It seems that all of the leaping spells have no animation, just a teleport. I'm working on a Dragoon, and teleporting feels really, really lame in comparison to jumping. Is there any type of fix for this?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Duuuuuude... is the "S" or the "C" silent in the word "scent"?

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [QUESTION] "Leap" Animation
« Reply #1 on: September 29, 2014, 09:35:53 am »
manually play JumpStart, Hover, JumpEnd in a script.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

nothawthorne

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 14
    • View Profile
    • http://theshardofentropy.ddns.net/
Re: [QUESTION] "Leap" Animation
« Reply #2 on: September 29, 2014, 12:18:37 pm »
Quote from: "schlumpf"
manually play JumpStart, Hover, JumpEnd in a script.
I have no idea how to go about doing this.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Duuuuuude... is the "S" or the "C" silent in the word "scent"?

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
Re: [QUESTION] "Leap" Animation
« Reply #3 on: September 29, 2014, 12:21:24 pm »
Trinitycore ? Spellid please (I know it's custom).
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

nothawthorne

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 14
    • View Profile
    • http://theshardofentropy.ddns.net/
Re: [QUESTION] "Leap" Animation
« Reply #4 on: September 29, 2014, 01:05:49 pm »
Quote from: "Ascathos"
Trinitycore ? Spellid please (I know it's custom).
70150 is the ID, and I'm using MaNGOS. 70150 is an existing spell, just one I would like to modify if the animation can work correctly.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Duuuuuude... is the "S" or the "C" silent in the word "scent"?

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
Re: [QUESTION] "Leap" Animation
« Reply #5 on: September 29, 2014, 01:10:17 pm »
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 Spells
enum 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....
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

nothawthorne

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 14
    • View Profile
    • http://theshardofentropy.ddns.net/
Re: [QUESTION] "Leap" Animation
« Reply #6 on: September 29, 2014, 02:24:51 pm »
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 Spells
enum 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?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Duuuuuude... is the "S" or the "C" silent in the word "scent"?

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
Re: [QUESTION] "Leap" Animation
« Reply #7 on: September 29, 2014, 03:29:53 pm »
Quote from: "nothawthorne"
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 Spells
enum 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?
Trinity is based on MaNGOS. However, I never bothered looking further into MaNGOS code. Check emulator guides about how to implement scripts and test.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

nothawthorne

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 14
    • View Profile
    • http://theshardofentropy.ddns.net/
Re: [QUESTION] "Leap" Animation
« Reply #8 on: September 29, 2014, 09:45:17 pm »
I'm getting a plethora of undeclared identifier, not member, and class undefined errors with that script and I'm 95% sure I'm importing it correctly.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
Duuuuuude... is the "S" or the "C" silent in the word "scent"?

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [QUESTION] "Leap" Animation
« Reply #9 on: September 29, 2014, 10:03:01 pm »
You may be "importing it correctly" (aka, copying the file). It still is a script for trinity, not mangos. Stuff is different there. Ask mangos people or find out the differences yourself. Or switch to trinity.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

kojak488

  • Registred Member
  • Creator of Worlds
  • *****
  • Posts: 351
    • View Profile
Re: [QUESTION] "Leap" Animation
« Reply #10 on: October 02, 2014, 03:03:00 pm »
I'd have to look up the spellIDs, but there are definitely spells that use a proper leaping animation.  You could then modify the spells limitations and effects to make it more like a leap attack quite easily.  All done via spell.dbc (and its subsets); no coding required.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »