Modcraft - The community dedicated to quality WoW modding!
Wrath of the Lich King Modding => Miscellaneous => Topic started by: nothawthorne 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?
-
manually play JumpStart, Hover, JumpEnd in a script.
-
manually play JumpStart, Hover, JumpEnd in a script.
I have no idea how to go about doing this.
-
Trinitycore ? Spellid please (I know it's custom).
-
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.
-
On Trinity, it would be something like this. Note, just a rough draft and I am not even sure if this works.
// 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....
-
On Trinity, it would be something like this. Note, just a rough draft and I am not even sure if this works.
// 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?
-
On Trinity, it would be something like this. Note, just a rough draft and I am not even sure if this works.
// 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.
-
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.
-
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.
-
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.