From 9dd4b8c98599b0bdccea7b9acb61cb4e7a35da8f Mon Sep 17 00:00:00 2001 From: megamage Date: Wed, 29 Apr 2009 00:17:33 -0500 Subject: [PATCH] [7729] Implement skill level dependent speed bonus for mount (item 40775). Author: Lightguard --HG-- branch : trunk --- src/game/SpellEffects.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index d9e4e0a7c74..e5d15ba6515 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -4843,6 +4843,25 @@ void Spell::EffectScriptEffect(uint32 effIndex) unitTarget->CastSpell(unitTarget, damage, false); break; } + // Winged Steed of the Ebon Blade + case 54729: + { + if(!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) + return; + + // Prevent stacking of mounts + unitTarget->RemoveSpellsCausingAura(SPELL_AURA_MOUNTED); + + // Triggered spell id dependent of riding skill + if(uint16 skillval = ((Player*)unitTarget)->GetSkillValue(SKILL_RIDING)) + { + if (skillval >= 300) + unitTarget->CastSpell(unitTarget, 54727, true); + else + unitTarget->CastSpell(unitTarget, 54726, true); + } + return; + } case 58418: // Portal to Orgrimmar case 58420: // Portal to Stormwind {