Cleans up Spell Targeting (#36)
This commit is contained in:
parent
de50bc9e43
commit
472b84f5ff
99 changed files with 653 additions and 2192 deletions
|
|
@ -7,7 +7,7 @@ using Server.Targeting;
|
|||
|
||||
namespace Server.Spells.Fourth
|
||||
{
|
||||
public class ArchProtectionSpell : MagerySpell
|
||||
public class ArchProtectionSpell : MagerySpell, ISpellTargetingPoint3D
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Arch Protection", "Vas Uus Sanct",
|
||||
|
|
@ -29,7 +29,7 @@ namespace Server.Spells.Fourth
|
|||
|
||||
public override void OnCast()
|
||||
{
|
||||
Caster.Target = new InternalTarget(this);
|
||||
Caster.Target = new SpellTargetPoint3D(this, TargetFlags.None, Core.ML ? 10 : 12);
|
||||
}
|
||||
|
||||
public void Target(IPoint3D p)
|
||||
|
|
@ -130,26 +130,5 @@ namespace Server.Spells.Fourth
|
|||
RemoveEntry(m_Owner);
|
||||
}
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private ArchProtectionSpell m_Owner;
|
||||
|
||||
public InternalTarget(ArchProtectionSpell owner) : base(Core.ML ? 10 : 12, true, TargetFlags.None)
|
||||
{
|
||||
m_Owner = owner;
|
||||
}
|
||||
|
||||
protected override void OnTarget(Mobile from, object o)
|
||||
{
|
||||
if (o is IPoint3D p)
|
||||
m_Owner.Target(p);
|
||||
}
|
||||
|
||||
protected override void OnTargetFinish(Mobile from)
|
||||
{
|
||||
m_Owner.FinishSequence();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue