Scripts/Spells: Dimensional Ripper - Area 52
Port From (https://github.com/TrinityCore/TrinityCore/commit/ea4c1ae7d0c4b3420b1d78623c5254466c64f43b)
This commit is contained in:
@@ -646,39 +646,6 @@ namespace Game.Spells
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Dimensional Ripper - Area 52
|
|
||||||
case 36890:
|
|
||||||
{
|
|
||||||
if (RandomHelper.randChance(50)) // 50% success
|
|
||||||
{
|
|
||||||
int rand_eff = RandomHelper.IRand(1, 4);
|
|
||||||
switch (rand_eff)
|
|
||||||
{
|
|
||||||
case 1:
|
|
||||||
// soul split - evil
|
|
||||||
m_caster.CastSpell(m_caster, 36900, new CastSpellExtraArgs(TriggerCastFlags.FullMask).SetOriginalCastId(m_castId));
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
// soul split - good
|
|
||||||
m_caster.CastSpell(m_caster, 36901, new CastSpellExtraArgs(TriggerCastFlags.FullMask).SetOriginalCastId(m_castId));
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
// Increase the size
|
|
||||||
m_caster.CastSpell(m_caster, 36895, new CastSpellExtraArgs(TriggerCastFlags.FullMask).SetOriginalCastId(m_castId));
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
// Transform
|
|
||||||
{
|
|
||||||
if (m_caster.ToPlayer().GetTeam() == Team.Alliance)
|
|
||||||
m_caster.CastSpell(m_caster, 36897, new CastSpellExtraArgs(TriggerCastFlags.FullMask).SetOriginalCastId(m_castId));
|
|
||||||
else
|
|
||||||
m_caster.CastSpell(m_caster, 36899, new CastSpellExtraArgs(TriggerCastFlags.FullMask).SetOriginalCastId(m_castId));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -171,6 +171,13 @@ namespace Scripts.Spells.Items
|
|||||||
public const uint ScrollOfRecallFailAlliance1 = 60323;
|
public const uint ScrollOfRecallFailAlliance1 = 60323;
|
||||||
public const uint ScrollOfRecallFailHorde1 = 60328;
|
public const uint ScrollOfRecallFailHorde1 = 60328;
|
||||||
|
|
||||||
|
// DimensionalRipperArea52
|
||||||
|
public const uint TransporterMalfunction = 36895;
|
||||||
|
public const uint TransformHorde = 36897;
|
||||||
|
public const uint TransformAlliance = 36899;
|
||||||
|
public const uint SoulSplitEvil = 36900;
|
||||||
|
public const uint SoulSplitGood = 36901;
|
||||||
|
|
||||||
//Shadowsfate
|
//Shadowsfate
|
||||||
public const uint SoulFeast = 71203;
|
public const uint SoulFeast = 71203;
|
||||||
|
|
||||||
@@ -1791,6 +1798,50 @@ namespace Scripts.Spells.Items
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Script]
|
||||||
|
class spell_item_dimensional_ripper_area52 : SpellScript
|
||||||
|
{
|
||||||
|
public override bool Load()
|
||||||
|
{
|
||||||
|
return GetCaster().IsPlayer();
|
||||||
|
}
|
||||||
|
|
||||||
|
void HandleScript(uint effIndex)
|
||||||
|
{
|
||||||
|
if (!RandomHelper.randChance(50)) // 50% success
|
||||||
|
return;
|
||||||
|
|
||||||
|
Unit caster = GetCaster();
|
||||||
|
|
||||||
|
uint spellId = 0;
|
||||||
|
switch (RandomHelper.URand(0, 3))
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
spellId = SpellIds.TransporterMalfunction;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
spellId = SpellIds.SoulSplitEvil;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
spellId = SpellIds.SoulSplitGood;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
if (caster.ToPlayer().GetTeamId() == TeamId.Alliance)
|
||||||
|
spellId = SpellIds.TransformHorde;
|
||||||
|
else
|
||||||
|
spellId = SpellIds.TransformAlliance;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
caster.CastSpell(caster, spellId, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Register()
|
||||||
|
{
|
||||||
|
OnEffectHitTarget.Add(new EffectHandler(HandleScript, 0, SpellEffectName.TeleportUnits));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[Script] // 71169 - Shadow's Fate (Shadowmourne questline)
|
[Script] // 71169 - Shadow's Fate (Shadowmourne questline)
|
||||||
class spell_item_unsated_craving : AuraScript
|
class spell_item_unsated_craving : AuraScript
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user