[11103] Fixed item 40775 mount work

* Move code to dummy aura (main spell mount aura not applied yet in time scripting effect processing)
* Use special mount spell selection helper instead raw code.
This commit is contained in:
VladimirMangos 2011-02-02 20:25:57 +03:00
parent 44cb8b6dd4
commit f09a4e2a1a
3 changed files with 4 additions and 19 deletions

View file

@ -2035,6 +2035,9 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
// Pet will be following owner, this makes him stop
target->addUnitState(UNIT_STAT_STUNNED);
return;
case 54729: // Winged Steed of the Ebon Blade
Spell::SelectMountByAreaAndSkill(target, GetSpellProto(), 0, 0, 54726, 54727, 0);
return;
case 62061: // Festive Holiday Mount
if (target->HasAuraType(SPELL_AURA_MOUNTED))
// Reindeer Transformation

View file

@ -6586,24 +6586,6 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
m_caster->CastSpell(m_caster, 57444, true);
return;
}
case 54729: // Winged Steed of the Ebon Blade
{
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 54436: // Demonic Empowerment (succubus Vanish effect)
{
if (!unitTarget)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11102"
#define REVISION_NR "11103"
#endif // __REVISION_NR_H__