evilstar
11.05.2010, 18:48
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 5de9926..e5aab26 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -5759,6 +5759,48 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
break;
}
+ case 47977: // Magic Broom
+ {
+ 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))
+ {
+ switch (skillval)
+ {
+ case 75: unitTarget->CastSpell(unitTarget, 42680, true);
+ case 150: unitTarget->CastSpell(unitTarget, 42683, true);
+ case 225: unitTarget->CastSpell(unitTarget, 42667, true);
+ case 300: unitTarget->CastSpell(unitTarget, 42668, true);
+ }
+ }
+ return;
+ }
+ case 48025: // Headless Horseman's Mount
+ {
+ 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))
+ {
+ switch (skillval)
+ {
+ case 75: unitTarget->CastSpell(unitTarget, 51621, true);
+ case 150: unitTarget->CastSpell(unitTarget, 48024, true);
+ case 225: unitTarget->CastSpell(unitTarget, 51617, true);
+ case 300: unitTarget->CastSpell(unitTarget, 48023, true);
+ }
+ }
+ return;
+ }
case 54729: // Winged Steed of the Ebon Blade
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
@@ -5777,6 +5819,48 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
}
return;
}
+ case 72286: // Invincible
+ {
+ 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))
+ {
+ switch (skillval)
+ {
+ case 75: unitTarget->CastSpell(unitTarget, 72281, true);
+ case 150: unitTarget->CastSpell(unitTarget, 72282, true);
+ case 225: unitTarget->CastSpell(unitTarget, 72283, true);
+ case 300: unitTarget->CastSpell(unitTarget, 72284, true);
+ }
+ }
+ return;
+ }
+ case 75614: // Celestial Steed
+ {
+ 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))
+ {
+ switch (skillval)
+ {
+ case 75: unitTarget->CastSpell(unitTarget, 75619, true);
+ case 150: unitTarget->CastSpell(unitTarget, 75620, true);
+ case 225: unitTarget->CastSpell(unitTarget, 75617, true);
+ case 300: unitTarget->CastSpell(unitTarget, 75618, true);
+ }
+ }
+ return;
+ }
case 54436: // Demonic Empowerment (succubus Vanish effect)
{
if (!unitTarget)
Я думаю тут еще надо организовать проверну по областям,
жду предложений как это сделать и может что изменить :)
index 5de9926..e5aab26 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -5759,6 +5759,48 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
break;
}
+ case 47977: // Magic Broom
+ {
+ 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))
+ {
+ switch (skillval)
+ {
+ case 75: unitTarget->CastSpell(unitTarget, 42680, true);
+ case 150: unitTarget->CastSpell(unitTarget, 42683, true);
+ case 225: unitTarget->CastSpell(unitTarget, 42667, true);
+ case 300: unitTarget->CastSpell(unitTarget, 42668, true);
+ }
+ }
+ return;
+ }
+ case 48025: // Headless Horseman's Mount
+ {
+ 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))
+ {
+ switch (skillval)
+ {
+ case 75: unitTarget->CastSpell(unitTarget, 51621, true);
+ case 150: unitTarget->CastSpell(unitTarget, 48024, true);
+ case 225: unitTarget->CastSpell(unitTarget, 51617, true);
+ case 300: unitTarget->CastSpell(unitTarget, 48023, true);
+ }
+ }
+ return;
+ }
case 54729: // Winged Steed of the Ebon Blade
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
@@ -5777,6 +5819,48 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
}
return;
}
+ case 72286: // Invincible
+ {
+ 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))
+ {
+ switch (skillval)
+ {
+ case 75: unitTarget->CastSpell(unitTarget, 72281, true);
+ case 150: unitTarget->CastSpell(unitTarget, 72282, true);
+ case 225: unitTarget->CastSpell(unitTarget, 72283, true);
+ case 300: unitTarget->CastSpell(unitTarget, 72284, true);
+ }
+ }
+ return;
+ }
+ case 75614: // Celestial Steed
+ {
+ 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))
+ {
+ switch (skillval)
+ {
+ case 75: unitTarget->CastSpell(unitTarget, 75619, true);
+ case 150: unitTarget->CastSpell(unitTarget, 75620, true);
+ case 225: unitTarget->CastSpell(unitTarget, 75617, true);
+ case 300: unitTarget->CastSpell(unitTarget, 75618, true);
+ }
+ }
+ return;
+ }
case 54436: // Demonic Empowerment (succubus Vanish effect)
{
if (!unitTarget)
Я думаю тут еще надо организовать проверну по областям,
жду предложений как это сделать и может что изменить :)