fix: Cleans up spell targeting (#851)

This commit is contained in:
Kamron Batman 2021-11-14 21:07:54 -08:00 • committed by GitHub
parent 15b2d08ea2
commit 239dda4b3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 61 additions and 70 deletions

View file

@ -9,21 +9,21 @@ namespace Server.Spells
public class SpellTargetMobile : Target, ISpellTarget
{
private readonly ISpellTargetingMobile m_Spell;
private readonly ISpellTargetingMobile _spell;
public SpellTargetMobile(ISpellTargetingMobile spell, TargetFlags flags, int range = 12) :
base(range, false, flags) => m_Spell = spell;
base(range, false, flags) => _spell = spell;
public ISpell Spell => m_Spell;
public ISpell Spell => _spell;
protected override void OnTarget(Mobile from, object o)
{
m_Spell.Target(o as Mobile);
_spell.Target(o as Mobile);
}
protected override void OnTargetFinish(Mobile from)
{
m_Spell?.FinishSequence();
_spell?.FinishSequence();
}
}
}