fix: More spell variable cleanup (#850)
This commit is contained in:
parent
5df7bf6a75
commit
15b2d08ea2
35 changed files with 162 additions and 162 deletions
|
|
@ -13,7 +13,7 @@ namespace Server.Spells.Chivalry
|
|||
9002
|
||||
);
|
||||
|
||||
private static readonly Dictionary<BaseWeapon, ExpireTimer> m_Table = new();
|
||||
private static readonly Dictionary<BaseWeapon, ExpireTimer> _table = new();
|
||||
|
||||
public ConsecrateWeaponSpell(Mobile caster, Item scroll = null) : base(caster, scroll, _info)
|
||||
{
|
||||
|
|
@ -86,12 +86,12 @@ namespace Server.Spells.Chivalry
|
|||
|
||||
var duration = TimeSpan.FromSeconds(seconds);
|
||||
|
||||
m_Table.TryGetValue(weapon, out var timer);
|
||||
_table.TryGetValue(weapon, out var timer);
|
||||
timer?.Stop();
|
||||
|
||||
weapon.Consecrated = true;
|
||||
|
||||
m_Table[weapon] = timer = new ExpireTimer(weapon, duration);
|
||||
_table[weapon] = timer = new ExpireTimer(weapon, duration);
|
||||
|
||||
timer.Start();
|
||||
}
|
||||
|
|
@ -112,7 +112,7 @@ namespace Server.Spells.Chivalry
|
|||
{
|
||||
m_Weapon.Consecrated = false;
|
||||
Effects.PlaySound(m_Weapon.GetWorldLocation(), m_Weapon.Map, 0x1F8);
|
||||
m_Table.Remove(m_Weapon);
|
||||
_table.Remove(m_Weapon);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace Server.Spells.Chivalry
|
|||
9002
|
||||
);
|
||||
|
||||
private static readonly Dictionary<Mobile, TimerExecutionToken> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, TimerExecutionToken> _table = new();
|
||||
|
||||
public DivineFurySpell(Mobile caster, Item scroll = null) : base(caster, scroll, _info)
|
||||
{
|
||||
|
|
@ -46,7 +46,7 @@ namespace Server.Spells.Chivalry
|
|||
out var timerToken
|
||||
);
|
||||
|
||||
m_Table[Caster] = timerToken;
|
||||
_table[Caster] = timerToken;
|
||||
|
||||
Caster.Delta(MobileDelta.WeaponDamage);
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ namespace Server.Spells.Chivalry
|
|||
|
||||
private static void RemoveTimer(Mobile m)
|
||||
{
|
||||
if (m_Table.Remove(m, out var timerToken))
|
||||
if (_table.Remove(m, out var timerToken))
|
||||
{
|
||||
timerToken.Cancel();
|
||||
}
|
||||
|
|
@ -74,6 +74,6 @@ namespace Server.Spells.Chivalry
|
|||
m.PlaySound(0xF8);
|
||||
}
|
||||
|
||||
public static bool UnderEffect(Mobile m) => m_Table.ContainsKey(m);
|
||||
public static bool UnderEffect(Mobile m) => _table.ContainsKey(m);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Server.Spells.Chivalry
|
|||
9002
|
||||
);
|
||||
|
||||
private static readonly Dictionary<Mobile, TimerExecutionToken> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, TimerExecutionToken> _table = new();
|
||||
|
||||
public EnemyOfOneSpell(Mobile caster, Item scroll = null) : base(caster, scroll, _info)
|
||||
{
|
||||
|
|
@ -42,7 +42,7 @@ namespace Server.Spells.Chivalry
|
|||
|
||||
Timer.StartTimer(TimeSpan.FromMinutes(delay), () => Expire_Callback(Caster), out var timerToken);
|
||||
|
||||
m_Table[Caster] = timerToken;
|
||||
_table[Caster] = timerToken;
|
||||
|
||||
if (Caster is PlayerMobile mobile)
|
||||
{
|
||||
|
|
@ -61,7 +61,7 @@ namespace Server.Spells.Chivalry
|
|||
|
||||
private static void RemoveTimer(Mobile m)
|
||||
{
|
||||
if (m_Table.Remove(m, out var timerToken))
|
||||
if (_table.Remove(m, out var timerToken))
|
||||
{
|
||||
timerToken.Cancel();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue