fix: More spell variable cleanup (#850)
This commit is contained in:
parent
5df7bf6a75
commit
15b2d08ea2
35 changed files with 162 additions and 162 deletions
|
|
@ -1226,7 +1226,7 @@ namespace Server.Spells
|
|||
|
||||
public static class TransformationSpellHelper
|
||||
{
|
||||
private static readonly Dictionary<Mobile, TransformContext> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, TransformContext> _table = new();
|
||||
|
||||
public static bool CheckCast(Mobile caster, Spell spell)
|
||||
{
|
||||
|
|
@ -1360,7 +1360,7 @@ namespace Server.Spells
|
|||
|
||||
public static void AddContext(Mobile m, TransformContext context)
|
||||
{
|
||||
m_Table[m] = context;
|
||||
_table[m] = context;
|
||||
}
|
||||
|
||||
public static void RemoveContext(Mobile m, bool resetGraphics)
|
||||
|
|
@ -1375,7 +1375,7 @@ namespace Server.Spells
|
|||
|
||||
public static void RemoveContext(Mobile m, TransformContext context, bool resetGraphics)
|
||||
{
|
||||
if (!m_Table.Remove(m))
|
||||
if (!_table.Remove(m))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -1399,7 +1399,7 @@ namespace Server.Spells
|
|||
|
||||
public static TransformContext GetContext(Mobile m)
|
||||
{
|
||||
m_Table.TryGetValue(m, out var context);
|
||||
_table.TryGetValue(m, out var context);
|
||||
|
||||
return context;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace Server.Spells.Bushido
|
|||
9002
|
||||
);
|
||||
|
||||
private static readonly Dictionary<Mobile, TimerExecutionToken> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, TimerExecutionToken> _table = new();
|
||||
private static readonly Dictionary<Mobile, TimerExecutionToken> m_RegenTable = new();
|
||||
|
||||
public Confidence(Mobile caster, Item scroll) : base(caster, scroll, _info)
|
||||
|
|
@ -49,7 +49,7 @@ namespace Server.Spells.Bushido
|
|||
FinishSequence();
|
||||
}
|
||||
|
||||
public static bool IsConfident(Mobile m) => m_Table.ContainsKey(m);
|
||||
public static bool IsConfident(Mobile m) => _table.ContainsKey(m);
|
||||
|
||||
public static void BeginConfidence(Mobile m)
|
||||
{
|
||||
|
|
@ -64,12 +64,12 @@ namespace Server.Spells.Bushido
|
|||
out var timerToken
|
||||
);
|
||||
|
||||
m_Table[m] = timerToken;
|
||||
_table[m] = timerToken;
|
||||
}
|
||||
|
||||
private static bool StopConfidenceTimer(Mobile m)
|
||||
{
|
||||
if (m_Table.Remove(m, out var timerToken))
|
||||
if (_table.Remove(m, out var timerToken))
|
||||
{
|
||||
timerToken.Cancel();
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Server.Spells.Bushido
|
|||
9002
|
||||
);
|
||||
|
||||
private static readonly Dictionary<Mobile, TimerExecutionToken> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, TimerExecutionToken> _table = new();
|
||||
|
||||
public CounterAttack(Mobile caster, Item scroll) : base(caster, scroll, _info)
|
||||
{
|
||||
|
|
@ -71,11 +71,11 @@ namespace Server.Spells.Bushido
|
|||
FinishSequence();
|
||||
}
|
||||
|
||||
public static bool IsCountering(Mobile m) => m_Table.ContainsKey(m);
|
||||
public static bool IsCountering(Mobile m) => _table.ContainsKey(m);
|
||||
|
||||
private static bool StopCounterTimer(Mobile m)
|
||||
{
|
||||
if (m_Table.Remove(m, out var timerToken))
|
||||
if (_table.Remove(m, out var timerToken))
|
||||
{
|
||||
timerToken.Cancel();
|
||||
return true;
|
||||
|
|
@ -97,7 +97,7 @@ namespace Server.Spells.Bushido
|
|||
out var timerToken
|
||||
);
|
||||
|
||||
m_Table[m] = timerToken;
|
||||
_table[m] = timerToken;
|
||||
}
|
||||
|
||||
public static void StopCountering(Mobile m)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Server.Spells.Bushido
|
|||
9002
|
||||
);
|
||||
|
||||
private static readonly Dictionary<Mobile, TimerExecutionToken> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, TimerExecutionToken> _table = new();
|
||||
|
||||
public Evasion(Mobile caster, Item scroll) : base(caster, scroll, _info)
|
||||
{
|
||||
|
|
@ -138,7 +138,7 @@ namespace Server.Spells.Bushido
|
|||
FinishSequence();
|
||||
}
|
||||
|
||||
public static bool IsEvading(Mobile m) => m_Table.ContainsKey(m);
|
||||
public static bool IsEvading(Mobile m) => _table.ContainsKey(m);
|
||||
|
||||
public static TimeSpan GetEvadeDuration(Mobile m)
|
||||
{
|
||||
|
|
@ -216,12 +216,12 @@ namespace Server.Spells.Bushido
|
|||
out var timerToken
|
||||
);
|
||||
|
||||
m_Table[m] = timerToken;
|
||||
_table[m] = timerToken;
|
||||
}
|
||||
|
||||
private static bool StopEvasionTimer(Mobile m)
|
||||
{
|
||||
if (m_Table.Remove(m, out var timer))
|
||||
if (_table.Remove(m, out var timer))
|
||||
{
|
||||
timer.Cancel();
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ namespace Server.Spells.Bushido
|
|||
{
|
||||
public class HonorableExecution : SamuraiMove
|
||||
{
|
||||
private static readonly Dictionary<Mobile, HonorableExecutionTimer> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, HonorableExecutionTimer> _table = new();
|
||||
|
||||
public override int BaseMana => 0;
|
||||
public override double RequiredSkill => 25.0;
|
||||
|
|
@ -63,20 +63,20 @@ namespace Server.Spells.Bushido
|
|||
timer = new HonorableExecutionTimer(attacker, mods);
|
||||
}
|
||||
|
||||
m_Table[attacker] = timer;
|
||||
_table[attacker] = timer;
|
||||
timer.Start();
|
||||
|
||||
attacker.Delta(MobileDelta.WeaponDamage);
|
||||
CheckGain(attacker);
|
||||
}
|
||||
|
||||
public static int GetSwingBonus(Mobile target) => m_Table.TryGetValue(target, out var info) ? info.m_SwingBonus : 0;
|
||||
public static int GetSwingBonus(Mobile target) => _table.TryGetValue(target, out var info) ? info.m_SwingBonus : 0;
|
||||
|
||||
public static bool IsUnderPenalty(Mobile target) => m_Table.TryGetValue(target, out var info) && info.m_Penalty;
|
||||
public static bool IsUnderPenalty(Mobile target) => _table.TryGetValue(target, out var info) && info.m_Penalty;
|
||||
|
||||
public static void RemovePenalty(Mobile target)
|
||||
{
|
||||
if (m_Table.Remove(target, out var timer))
|
||||
if (_table.Remove(target, out var timer))
|
||||
{
|
||||
timer.Clear();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace Server.Spells.Fifth
|
|||
Reagent.Nightshade
|
||||
);
|
||||
|
||||
private static readonly Dictionary<Mobile, TimerExecutionToken> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, TimerExecutionToken> _table = new();
|
||||
|
||||
public IncognitoSpell(Mobile caster, Item scroll = null) : base(caster, scroll, _info)
|
||||
{
|
||||
|
|
@ -112,7 +112,7 @@ namespace Server.Spells.Fifth
|
|||
|
||||
var length = TimeSpan.FromSeconds(timeVal);
|
||||
Timer.StartTimer(length, () => EndIncognito(Caster), out var timerToken);
|
||||
m_Table[Caster] = timerToken;
|
||||
_table[Caster] = timerToken;
|
||||
|
||||
BuffInfo.AddBuff(Caster, new BuffInfo(BuffIcon.Incognito, 1075819, length, Caster));
|
||||
}
|
||||
|
|
@ -127,7 +127,7 @@ namespace Server.Spells.Fifth
|
|||
|
||||
public static void StopTimer(Mobile m)
|
||||
{
|
||||
if (m_Table.Remove(m, out var timerToken))
|
||||
if (_table.Remove(m, out var timerToken))
|
||||
{
|
||||
timerToken.Cancel();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace Server.Spells.Fifth
|
|||
Reagent.SpidersSilk
|
||||
);
|
||||
|
||||
private static readonly Dictionary<Mobile, ResistanceMod[]> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, ResistanceMod[]> _table = new();
|
||||
|
||||
public MagicReflectSpell(Mobile caster, Item scroll = null) : base(caster, scroll, _info)
|
||||
{
|
||||
|
|
@ -59,7 +59,7 @@ namespace Server.Spells.Fifth
|
|||
{
|
||||
var targ = Caster;
|
||||
|
||||
if (m_Table.Remove(targ, out var mods))
|
||||
if (_table.Remove(targ, out var mods))
|
||||
{
|
||||
targ.PlaySound(0x1ED);
|
||||
targ.FixedParticles(0x375A, 10, 15, 5037, EffectLayer.Waist);
|
||||
|
|
@ -88,7 +88,7 @@ namespace Server.Spells.Fifth
|
|||
new ResistanceMod(ResistanceType.Energy, otherMod)
|
||||
};
|
||||
|
||||
m_Table[targ] = mods;
|
||||
_table[targ] = mods;
|
||||
|
||||
for (var i = 0; i < mods.Length; ++i)
|
||||
{
|
||||
|
|
@ -137,7 +137,7 @@ namespace Server.Spells.Fifth
|
|||
|
||||
public static void EndReflect(Mobile m)
|
||||
{
|
||||
if (!m_Table.Remove(m, out var mods))
|
||||
if (!_table.Remove(m, out var mods))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace Server.Spells.First
|
|||
Reagent.SulfurousAsh
|
||||
);
|
||||
|
||||
private static readonly Dictionary<Mobile, ResistanceMod[]> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, ResistanceMod[]> _table = new();
|
||||
|
||||
public ReactiveArmorSpell(Mobile caster, Item scroll = null) : base(caster, scroll, _info)
|
||||
{
|
||||
|
|
@ -61,7 +61,7 @@ namespace Server.Spells.First
|
|||
{
|
||||
var targ = Caster;
|
||||
|
||||
if (m_Table.Remove(targ, out var mods))
|
||||
if (_table.Remove(targ, out var mods))
|
||||
{
|
||||
targ.PlaySound(0x1ED);
|
||||
targ.FixedParticles(0x376A, 9, 32, 5008, EffectLayer.Waist);
|
||||
|
|
@ -90,7 +90,7 @@ namespace Server.Spells.First
|
|||
new ResistanceMod(ResistanceType.Energy, -5)
|
||||
};
|
||||
|
||||
m_Table[targ] = mods;
|
||||
_table[targ] = mods;
|
||||
|
||||
for (var i = 0; i < mods.Length; ++i)
|
||||
{
|
||||
|
|
@ -144,7 +144,7 @@ namespace Server.Spells.First
|
|||
|
||||
public static void EndArmor(Mobile m)
|
||||
{
|
||||
if (!m_Table.Remove(m, out var mods))
|
||||
if (!_table.Remove(m, out var mods))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace Server.Spells.Fourth
|
|||
Reagent.SpidersSilk
|
||||
);
|
||||
|
||||
private static readonly HashSet<Mobile> m_Table = new();
|
||||
private static readonly HashSet<Mobile> _table = new();
|
||||
|
||||
public ManaDrainSpell(Mobile caster, Item scroll = null) : base(caster, scroll, _info)
|
||||
{
|
||||
|
|
@ -40,7 +40,7 @@ namespace Server.Spells.Fourth
|
|||
{
|
||||
var toDrain = Math.Clamp(40 + (int)(GetDamageSkill(Caster) - GetResistSkill(m)), 0, m.Mana);
|
||||
|
||||
if (m_Table.Contains(m))
|
||||
if (_table.Contains(m))
|
||||
{
|
||||
toDrain = 0;
|
||||
}
|
||||
|
|
@ -52,7 +52,7 @@ namespace Server.Spells.Fourth
|
|||
{
|
||||
m.Mana -= toDrain;
|
||||
|
||||
m_Table.Add(m);
|
||||
_table.Add(m);
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(5.0), () => AosDelay_Callback(m, toDrain));
|
||||
}
|
||||
}
|
||||
|
|
@ -96,7 +96,7 @@ namespace Server.Spells.Fourth
|
|||
m.PlaySound(0x28E);
|
||||
}
|
||||
|
||||
m_Table.Remove(m);
|
||||
_table.Remove(m);
|
||||
}
|
||||
|
||||
public override double GetResistPercent(Mobile target) => 99.0;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace Server.Spells.Mysticism
|
|||
Reagent.SulfurousAsh
|
||||
);
|
||||
|
||||
private static readonly Dictionary<Mobile, SpellPlagueTimer> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, SpellPlagueTimer> _table = new();
|
||||
|
||||
public SpellPlagueSpell(Mobile caster, Item scroll = null)
|
||||
: base(caster, scroll, _info)
|
||||
|
|
@ -64,13 +64,13 @@ namespace Server.Spells.Mysticism
|
|||
|
||||
var timer = new SpellPlagueTimer(this, targeted);
|
||||
|
||||
if (m_Table.TryGetValue(targeted, out var oldtimer))
|
||||
if (_table.TryGetValue(targeted, out var oldtimer))
|
||||
{
|
||||
oldtimer.SetNext(timer);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Table[targeted] = timer;
|
||||
_table[targeted] = timer;
|
||||
timer.StartPlague();
|
||||
}
|
||||
}
|
||||
|
|
@ -78,11 +78,11 @@ namespace Server.Spells.Mysticism
|
|||
FinishSequence();
|
||||
}
|
||||
|
||||
public static bool UnderEffect(Mobile m) => m_Table.ContainsKey(m);
|
||||
public static bool UnderEffect(Mobile m) => _table.ContainsKey(m);
|
||||
|
||||
public static void RemoveEffect(Mobile m)
|
||||
{
|
||||
if (m_Table.TryGetValue(m, out var context))
|
||||
if (_table.TryGetValue(m, out var context))
|
||||
{
|
||||
context.EndPlague(false);
|
||||
}
|
||||
|
|
@ -90,7 +90,7 @@ namespace Server.Spells.Mysticism
|
|||
|
||||
public static void CheckPlague(Mobile m)
|
||||
{
|
||||
if (m_Table.TryGetValue(m, out var context))
|
||||
if (_table.TryGetValue(m, out var context))
|
||||
{
|
||||
context.OnDamage();
|
||||
}
|
||||
|
|
@ -183,12 +183,12 @@ namespace Server.Spells.Mysticism
|
|||
{
|
||||
if (restart && m_Next != null)
|
||||
{
|
||||
m_Table[m_Target] = m_Next;
|
||||
_table[m_Target] = m_Next;
|
||||
m_Next.StartPlague();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Table.Remove(m_Target);
|
||||
_table.Remove(m_Target);
|
||||
BuffInfo.RemoveBuff(m_Target, BuffIcon.SpellPlague);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace Server.Spells.Mysticism
|
|||
Reagent.Garlic
|
||||
);
|
||||
|
||||
private static readonly Dictionary<Mobile, ResistanceMod[]> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, ResistanceMod[]> _table = new();
|
||||
|
||||
public StoneFormSpell(Mobile caster, Item scroll = null)
|
||||
: base(caster, scroll, _info)
|
||||
|
|
@ -36,7 +36,7 @@ namespace Server.Spells.Mysticism
|
|||
EventSink.PlayerDeath += OnPlayerDeath;
|
||||
}
|
||||
|
||||
public static bool UnderEffect(Mobile m) => m_Table.ContainsKey(m);
|
||||
public static bool UnderEffect(Mobile m) => _table.ContainsKey(m);
|
||||
|
||||
public override bool CheckCast()
|
||||
{
|
||||
|
|
@ -118,7 +118,7 @@ namespace Server.Spells.Mysticism
|
|||
Caster.AddResistanceMod(mods[i]);
|
||||
}
|
||||
|
||||
m_Table[Caster] = mods;
|
||||
_table[Caster] = mods;
|
||||
|
||||
Caster.PlaySound(0x65A);
|
||||
Caster.Delta(MobileDelta.Resistances);
|
||||
|
|
@ -145,7 +145,7 @@ namespace Server.Spells.Mysticism
|
|||
|
||||
public static void RemoveEffects(Mobile m)
|
||||
{
|
||||
if (!m_Table.Remove(m, out var mods))
|
||||
if (!_table.Remove(m, out var mods))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ namespace Server.Spells.Necromancy
|
|||
)
|
||||
};
|
||||
|
||||
private static readonly Dictionary<Mobile, List<Mobile>> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, List<Mobile>> _table = new();
|
||||
|
||||
public AnimateDeadSpell(Mobile caster, Item scroll = null) : base(caster, scroll, _info)
|
||||
{
|
||||
|
|
@ -235,7 +235,7 @@ namespace Server.Spells.Necromancy
|
|||
|
||||
public static void Unregister(Mobile master, Mobile summoned)
|
||||
{
|
||||
if (master == null || !m_Table.TryGetValue(master, out var list))
|
||||
if (master == null || !_table.TryGetValue(master, out var list))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -244,7 +244,7 @@ namespace Server.Spells.Necromancy
|
|||
|
||||
if (list.Count == 0)
|
||||
{
|
||||
m_Table.Remove(master);
|
||||
_table.Remove(master);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -255,9 +255,9 @@ namespace Server.Spells.Necromancy
|
|||
return;
|
||||
}
|
||||
|
||||
if (!m_Table.TryGetValue(master, out var list))
|
||||
if (!_table.TryGetValue(master, out var list))
|
||||
{
|
||||
m_Table[master] = list = new List<Mobile>();
|
||||
_table[master] = list = new List<Mobile>();
|
||||
}
|
||||
|
||||
for (var i = list.Count - 1; i >= 0; --i)
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace Server.Spells.Necromancy
|
|||
);
|
||||
|
||||
private static readonly Dictionary<Mobile, Mobile> m_OathTable = new();
|
||||
private static readonly Dictionary<Mobile, ExpireTimer> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, ExpireTimer> _table = new();
|
||||
|
||||
public BloodOathSpell(Mobile caster, Item scroll = null) : base(caster, scroll, _info)
|
||||
{
|
||||
|
|
@ -65,7 +65,7 @@ namespace Server.Spells.Necromancy
|
|||
* ((ss-rm)/8)+8
|
||||
*/
|
||||
|
||||
m_Table.TryGetValue(m, out var timer);
|
||||
_table.TryGetValue(m, out var timer);
|
||||
timer?.DoExpire();
|
||||
|
||||
m_OathTable[Caster] = Caster;
|
||||
|
|
@ -90,7 +90,7 @@ namespace Server.Spells.Necromancy
|
|||
BuffInfo.AddBuff(Caster, new BuffInfo(BuffIcon.BloodOathCaster, 1075659, duration, Caster, m.Name));
|
||||
BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.BloodOathCurse, 1075661, duration, m, Caster.Name));
|
||||
|
||||
m_Table[m] = timer;
|
||||
_table[m] = timer;
|
||||
HarmfulSpell(m);
|
||||
}
|
||||
|
||||
|
|
@ -104,7 +104,7 @@ namespace Server.Spells.Necromancy
|
|||
|
||||
public static void RemoveCurse(Mobile m)
|
||||
{
|
||||
m_Table.TryGetValue(m, out var t);
|
||||
_table.TryGetValue(m, out var t);
|
||||
t?.DoExpire();
|
||||
}
|
||||
|
||||
|
|
@ -153,7 +153,7 @@ namespace Server.Spells.Necromancy
|
|||
BuffInfo.RemoveBuff(m_Caster, BuffIcon.BloodOathCaster);
|
||||
BuffInfo.RemoveBuff(m_Target, BuffIcon.BloodOathCurse);
|
||||
|
||||
m_Table.Remove(m_Caster);
|
||||
_table.Remove(m_Caster);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace Server.Spells.Necromancy
|
|||
Reagent.GraveDust
|
||||
);
|
||||
|
||||
private static readonly Dictionary<Mobile, ExpireTimer> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, ExpireTimer> _table = new();
|
||||
|
||||
public CorpseSkinSpell(Mobile caster, Item scroll = null) : base(caster, scroll, _info)
|
||||
{
|
||||
|
|
@ -49,7 +49,7 @@ namespace Server.Spells.Necromancy
|
|||
* NOTE: Resistance is not checked if targeting yourself
|
||||
*/
|
||||
|
||||
if (m_Table.TryGetValue(m, out var timer))
|
||||
if (_table.TryGetValue(m, out var timer))
|
||||
{
|
||||
timer.DoExpire();
|
||||
}
|
||||
|
|
@ -82,7 +82,7 @@ namespace Server.Spells.Necromancy
|
|||
|
||||
BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.CorpseSkin, 1075663, duration, m));
|
||||
|
||||
m_Table[m] = timer;
|
||||
_table[m] = timer;
|
||||
|
||||
for (var i = 0; i < mods.Length; ++i)
|
||||
{
|
||||
|
|
@ -102,7 +102,7 @@ namespace Server.Spells.Necromancy
|
|||
|
||||
public static bool RemoveCurse(Mobile m)
|
||||
{
|
||||
if (!m_Table.TryGetValue(m, out var t))
|
||||
if (!_table.TryGetValue(m, out var t))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
@ -132,7 +132,7 @@ namespace Server.Spells.Necromancy
|
|||
|
||||
Stop();
|
||||
BuffInfo.RemoveBuff(m_Mobile, BuffIcon.CorpseSkin);
|
||||
m_Table.Remove(m_Mobile);
|
||||
_table.Remove(m_Mobile);
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace Server.Spells.Necromancy
|
|||
Reagent.PigIron
|
||||
);
|
||||
|
||||
private static readonly Dictionary<BaseWeapon, ExpireTimer> m_Table = new();
|
||||
private static readonly Dictionary<BaseWeapon, ExpireTimer> _table = new();
|
||||
|
||||
public CurseWeaponSpell(Mobile caster, Item scroll = null) : base(caster, scroll, _info)
|
||||
{
|
||||
|
|
@ -50,11 +50,11 @@ namespace Server.Spells.Necromancy
|
|||
|
||||
var duration = TimeSpan.FromSeconds(Caster.Skills.SpiritSpeak.Value / 3.4 + 1.0);
|
||||
|
||||
m_Table.TryGetValue(weapon, out var timer);
|
||||
_table.TryGetValue(weapon, out var timer);
|
||||
timer?.Stop();
|
||||
|
||||
weapon.Cursed = true;
|
||||
m_Table[weapon] = timer = new ExpireTimer(weapon, duration);
|
||||
_table[weapon] = timer = new ExpireTimer(weapon, duration);
|
||||
|
||||
timer.Start();
|
||||
}
|
||||
|
|
@ -75,7 +75,7 @@ namespace Server.Spells.Necromancy
|
|||
{
|
||||
m_Weapon.Cursed = false;
|
||||
Effects.PlaySound(m_Weapon.GetWorldLocation(), m_Weapon.Map, 0xFA);
|
||||
m_Table.Remove(m_Weapon);
|
||||
_table.Remove(m_Weapon);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace Server.Spells.Necromancy
|
|||
Reagent.NoxCrystal
|
||||
);
|
||||
|
||||
private static readonly Dictionary<Mobile, DefaultSkillMod> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, DefaultSkillMod> _table = new();
|
||||
|
||||
public EvilOmenSpell(Mobile caster, Item scroll = null)
|
||||
: base(caster, scroll, _info)
|
||||
|
|
@ -52,7 +52,7 @@ namespace Server.Spells.Necromancy
|
|||
m.FixedParticles(0x3728, 1, 13, 9912, 1150, 7, EffectLayer.Head);
|
||||
m.FixedParticles(0x3779, 1, 15, 9502, 67, 7, EffectLayer.Head);
|
||||
|
||||
if (!m_Table.ContainsKey(m))
|
||||
if (!_table.ContainsKey(m))
|
||||
{
|
||||
var mod = new DefaultSkillMod(SkillName.MagicResist, false, 50.0);
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ namespace Server.Spells.Necromancy
|
|||
m.AddSkillMod(mod);
|
||||
}
|
||||
|
||||
m_Table[m] = mod;
|
||||
_table[m] = mod;
|
||||
}
|
||||
|
||||
var duration = TimeSpan.FromSeconds(Caster.Skills.SpiritSpeak.Value / 12 + 1.0);
|
||||
|
|
@ -83,7 +83,7 @@ namespace Server.Spells.Necromancy
|
|||
|
||||
public static bool TryEndEffect(Mobile m)
|
||||
{
|
||||
if (!m_Table.Remove(m, out var mod))
|
||||
if (!_table.Remove(m, out var mod))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace Server.Spells.Necromancy
|
|||
Reagent.DaemonBlood
|
||||
);
|
||||
|
||||
private static readonly Dictionary<Mobile, MRBucket> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, MRBucket> _table = new();
|
||||
|
||||
public MindRotSpell(Mobile caster, Item scroll = null) : base(caster, scroll, _info)
|
||||
{
|
||||
|
|
@ -73,7 +73,7 @@ namespace Server.Spells.Necromancy
|
|||
|
||||
public static void ClearMindRotScalar(Mobile m)
|
||||
{
|
||||
if (m_Table.Remove(m, out var tmpB))
|
||||
if (_table.Remove(m, out var tmpB))
|
||||
{
|
||||
tmpB.m_MRExpireTimer.Stop();
|
||||
m.SendLocalizedMessage(1060872); // Your mind feels normal again.
|
||||
|
|
@ -82,11 +82,11 @@ namespace Server.Spells.Necromancy
|
|||
BuffInfo.RemoveBuff(m, BuffIcon.Mindrot);
|
||||
}
|
||||
|
||||
public static bool HasMindRotScalar(Mobile m) => m_Table.ContainsKey(m);
|
||||
public static bool HasMindRotScalar(Mobile m) => _table.ContainsKey(m);
|
||||
|
||||
public static bool GetMindRotScalar(Mobile m, ref double scalar)
|
||||
{
|
||||
if (m_Table.TryGetValue(m, out var tmpB))
|
||||
if (_table.TryGetValue(m, out var tmpB))
|
||||
{
|
||||
scalar = tmpB.m_Scalar;
|
||||
return true;
|
||||
|
|
@ -97,10 +97,10 @@ namespace Server.Spells.Necromancy
|
|||
|
||||
public static void SetMindRotScalar(Mobile caster, Mobile target, double scalar, TimeSpan duration)
|
||||
{
|
||||
if (!m_Table.ContainsKey(target))
|
||||
if (!_table.ContainsKey(target))
|
||||
{
|
||||
var tmpB = new MRBucket(scalar, new MRExpireTimer(target, duration));
|
||||
m_Table.Add(target, tmpB);
|
||||
_table.Add(target, tmpB);
|
||||
BuffInfo.AddBuff(target, new BuffInfo(BuffIcon.Mindrot, 1075665, duration, target));
|
||||
tmpB.m_MRExpireTimer.Start();
|
||||
target.SendLocalizedMessage(1074384);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace Server.Spells.Necromancy
|
|||
Reagent.PigIron
|
||||
);
|
||||
|
||||
private static readonly Dictionary<Mobile, InternalTimer> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, InternalTimer> _table = new();
|
||||
|
||||
public PainSpikeSpell(Mobile caster, Item scroll = null) : base(caster, scroll, _info)
|
||||
{
|
||||
|
|
@ -56,9 +56,9 @@ namespace Server.Spells.Necromancy
|
|||
|
||||
var buffTime = TimeSpan.FromSeconds(10.0);
|
||||
|
||||
if (!m_Table.TryGetValue(m, out var timer))
|
||||
if (!_table.TryGetValue(m, out var timer))
|
||||
{
|
||||
m_Table[m] = timer = new InternalTimer(m, damage);
|
||||
_table[m] = timer = new InternalTimer(m, damage);
|
||||
timer.Start();
|
||||
}
|
||||
else
|
||||
|
|
@ -102,7 +102,7 @@ namespace Server.Spells.Necromancy
|
|||
|
||||
protected override void OnTick()
|
||||
{
|
||||
m_Table.Remove(m_Mobile);
|
||||
_table.Remove(m_Mobile);
|
||||
|
||||
if (m_Mobile.Alive && !m_Mobile.IsDeadBondedPet)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace Server.Spells.Necromancy
|
|||
Reagent.NoxCrystal
|
||||
);
|
||||
|
||||
private static readonly Dictionary<Mobile, InternalTimer> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, InternalTimer> _table = new();
|
||||
|
||||
public StrangleSpell(Mobile caster, Item scroll = null) : base(caster, scroll, _info)
|
||||
{
|
||||
|
|
@ -60,9 +60,9 @@ namespace Server.Spells.Necromancy
|
|||
m.FixedParticles(0x36CB, 1, 9, 9911, 67, 5, EffectLayer.Head);
|
||||
m.FixedParticles(0x374A, 1, 17, 9502, 1108, 4, (EffectLayer)255);
|
||||
|
||||
if (!m_Table.TryGetValue(m, out var timer))
|
||||
if (!_table.TryGetValue(m, out var timer))
|
||||
{
|
||||
m_Table[m] = timer = new InternalTimer(m, Caster);
|
||||
_table[m] = timer = new InternalTimer(m, Caster);
|
||||
timer.Start();
|
||||
}
|
||||
|
||||
|
|
@ -118,7 +118,7 @@ namespace Server.Spells.Necromancy
|
|||
|
||||
public static bool RemoveCurse(Mobile m)
|
||||
{
|
||||
if (!m_Table.Remove(m, out var timer))
|
||||
if (!_table.Remove(m, out var timer))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
@ -168,7 +168,7 @@ namespace Server.Spells.Necromancy
|
|||
{
|
||||
if (!m_Target.Alive)
|
||||
{
|
||||
m_Table.Remove(m_Target);
|
||||
_table.Remove(m_Target);
|
||||
Stop();
|
||||
}
|
||||
|
||||
|
|
@ -203,7 +203,7 @@ namespace Server.Spells.Necromancy
|
|||
if (m_Count == 0)
|
||||
{
|
||||
m_Target.SendLocalizedMessage(1061687); // You can breath normally again.
|
||||
m_Table.Remove(m_Target);
|
||||
_table.Remove(m_Target);
|
||||
Stop();
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ namespace Server.Spells.Ninjitsu
|
|||
);
|
||||
|
||||
private static readonly Dictionary<Mobile, int> m_LastAnimalForms = new();
|
||||
private static readonly Dictionary<Mobile, AnimalFormContext> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, AnimalFormContext> _table = new();
|
||||
|
||||
private bool m_WasMoving;
|
||||
|
||||
|
|
@ -272,7 +272,7 @@ namespace Server.Spells.Ninjitsu
|
|||
|
||||
public static void AddContext(Mobile m, AnimalFormContext context)
|
||||
{
|
||||
m_Table[m] = context;
|
||||
_table[m] = context;
|
||||
|
||||
if (context.Type == typeof(BakeKitsune) || context.Type == typeof(GreyWolf))
|
||||
{
|
||||
|
|
@ -292,7 +292,7 @@ namespace Server.Spells.Ninjitsu
|
|||
|
||||
public static void RemoveContext(Mobile m, AnimalFormContext context, bool resetGraphics)
|
||||
{
|
||||
m_Table.Remove(m);
|
||||
_table.Remove(m);
|
||||
|
||||
if (context.SpeedBoost)
|
||||
{
|
||||
|
|
@ -324,9 +324,9 @@ namespace Server.Spells.Ninjitsu
|
|||
context.Timer.Stop();
|
||||
}
|
||||
|
||||
public static AnimalFormContext GetContext(Mobile m) => m_Table.TryGetValue(m, out var context) ? context : null;
|
||||
public static AnimalFormContext GetContext(Mobile m) => _table.TryGetValue(m, out var context) ? context : null;
|
||||
|
||||
public static bool UnderTransformation(Mobile m) => m_Table.ContainsKey(m);
|
||||
public static bool UnderTransformation(Mobile m) => _table.ContainsKey(m);
|
||||
|
||||
public static bool UnderTransformation(Mobile m, Type type) => GetContext(m)?.Type == type;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace Server.Spells.Ninjitsu
|
|||
{
|
||||
public class DeathStrike : NinjaMove
|
||||
{
|
||||
private static readonly Dictionary<Mobile, DeathStrikeTimer> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, DeathStrikeTimer> _table = new();
|
||||
|
||||
public override int BaseMana => 30;
|
||||
public override double RequiredSkill => 85.0;
|
||||
|
|
@ -51,7 +51,7 @@ namespace Server.Spells.Ninjitsu
|
|||
|
||||
var damageBonus = 0;
|
||||
|
||||
if (m_Table.Remove(defender, out var timer))
|
||||
if (_table.Remove(defender, out var timer))
|
||||
{
|
||||
defender.SendLocalizedMessage(1063092); // Your opponent lands another Death Strike!
|
||||
|
||||
|
|
@ -74,7 +74,7 @@ namespace Server.Spells.Ninjitsu
|
|||
|
||||
var t = new DeathStrikeTimer(defender, attacker, damageBonus, isRanged);
|
||||
|
||||
m_Table[defender] = t;
|
||||
_table[defender] = t;
|
||||
|
||||
t.Start();
|
||||
|
||||
|
|
@ -83,7 +83,7 @@ namespace Server.Spells.Ninjitsu
|
|||
|
||||
public static void AddStep(Mobile m)
|
||||
{
|
||||
if (m_Table.TryGetValue(m, out var timer) && ++timer.Steps >= 5)
|
||||
if (_table.TryGetValue(m, out var timer) && ++timer.Steps >= 5)
|
||||
{
|
||||
timer.ProcessDeathStrike();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace Server.Spells.Ninjitsu
|
|||
{
|
||||
public class KiAttack : NinjaMove
|
||||
{
|
||||
private static readonly Dictionary<Mobile, KiAttackTimer> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, KiAttackTimer> _table = new();
|
||||
|
||||
public override int BaseMana => 25;
|
||||
public override double RequiredSkill => 80.0;
|
||||
|
|
@ -22,7 +22,7 @@ namespace Server.Spells.Ninjitsu
|
|||
}
|
||||
|
||||
var t = new KiAttackTimer(from);
|
||||
m_Table[from] = t;
|
||||
_table[from] = t;
|
||||
t.Start();
|
||||
}
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ namespace Server.Spells.Ninjitsu
|
|||
|
||||
public override void OnClearMove(Mobile from)
|
||||
{
|
||||
if (m_Table.Remove(from, out var t))
|
||||
if (_table.Remove(from, out var t))
|
||||
{
|
||||
t.Stop();
|
||||
}
|
||||
|
|
@ -94,7 +94,7 @@ namespace Server.Spells.Ninjitsu
|
|||
|
||||
public static double GetBonus(Mobile from)
|
||||
{
|
||||
if (!m_Table.TryGetValue(from, out var t))
|
||||
if (!_table.TryGetValue(from, out var t))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -121,7 +121,7 @@ namespace Server.Spells.Ninjitsu
|
|||
ClearCurrentMove(m_Mobile);
|
||||
m_Mobile.SendLocalizedMessage(1063102); // You failed to complete your Ki Attack in time.
|
||||
|
||||
m_Table.Remove(m_Mobile);
|
||||
_table.Remove(m_Mobile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ namespace Server.Spells.Ninjitsu
|
|||
public class SurpriseAttack : NinjaMove
|
||||
{
|
||||
private static readonly Dictionary<Mobile, SurpriseAttackInfo>
|
||||
m_Table = new();
|
||||
_table = new();
|
||||
|
||||
public override int BaseMana => 20;
|
||||
public override double RequiredSkill => Core.ML ? 60.0 : 30.0;
|
||||
|
|
@ -62,7 +62,7 @@ namespace Server.Spells.Ninjitsu
|
|||
var info = new SurpriseAttackInfo(defender, malus);
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(8.0), () => EndSurprise(info), out info._timerToken);
|
||||
|
||||
m_Table[defender] = info;
|
||||
_table[defender] = info;
|
||||
|
||||
CheckGain(attacker);
|
||||
}
|
||||
|
|
@ -78,7 +78,7 @@ namespace Server.Spells.Ninjitsu
|
|||
|
||||
public static bool GetMalus(Mobile target, ref int malus)
|
||||
{
|
||||
if (!m_Table.TryGetValue(target, out var info))
|
||||
if (!_table.TryGetValue(target, out var info))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
@ -89,7 +89,7 @@ namespace Server.Spells.Ninjitsu
|
|||
|
||||
private static void StopTimer(Mobile m)
|
||||
{
|
||||
if (m_Table.Remove(m, out var info))
|
||||
if (_table.Remove(m, out var info))
|
||||
{
|
||||
info._timerToken.Cancel();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace Server.Spells.Second
|
|||
Reagent.SulfurousAsh
|
||||
);
|
||||
|
||||
private static readonly Dictionary<Mobile, Tuple<ResistanceMod, DefaultSkillMod>> m_Table =
|
||||
private static readonly Dictionary<Mobile, Tuple<ResistanceMod, DefaultSkillMod>> _table =
|
||||
new();
|
||||
|
||||
public ProtectionSpell(Mobile caster, Item scroll = null) : base(caster, scroll, _info)
|
||||
|
|
@ -60,7 +60,7 @@ namespace Server.Spells.Second
|
|||
* even after dying<EFBFBD>until you <EFBFBD>turn them off<EFBFBD> by casting them again.
|
||||
*/
|
||||
|
||||
if (m_Table.Remove(target, out var mods))
|
||||
if (_table.Remove(target, out var mods))
|
||||
{
|
||||
target.PlaySound(0x1ED);
|
||||
target.FixedParticles(0x375A, 9, 20, 5016, EffectLayer.Waist);
|
||||
|
|
@ -89,7 +89,7 @@ namespace Server.Spells.Second
|
|||
)
|
||||
);
|
||||
|
||||
m_Table[target] = mods;
|
||||
_table[target] = mods;
|
||||
Registry[target] = 1000; // 100.0% protection from disruption
|
||||
|
||||
target.AddResistanceMod(mods.Item1);
|
||||
|
|
@ -104,7 +104,7 @@ namespace Server.Spells.Second
|
|||
|
||||
public static void EndProtection(Mobile m)
|
||||
{
|
||||
if (!m_Table.Remove(m, out var mods))
|
||||
if (!_table.Remove(m, out var mods))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace Server.Spells.Seventh
|
|||
Reagent.MandrakeRoot
|
||||
);
|
||||
|
||||
private static readonly Dictionary<Mobile, TimerExecutionToken> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, TimerExecutionToken> _table = new();
|
||||
|
||||
private readonly int m_NewBody;
|
||||
|
||||
|
|
@ -170,7 +170,7 @@ namespace Server.Spells.Seventh
|
|||
var duration = Math.Max((int)caster.Skills.Magery.Value, 120);
|
||||
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(duration), () => EndPolymorph(caster), out var timerToken);
|
||||
m_Table[caster] = timerToken;
|
||||
_table[caster] = timerToken;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -185,7 +185,7 @@ namespace Server.Spells.Seventh
|
|||
|
||||
public static void StopTimer(Mobile m)
|
||||
{
|
||||
if (m_Table.Remove(m, out var timer))
|
||||
if (_table.Remove(m, out var timer))
|
||||
{
|
||||
timer.Cancel();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ namespace Server.Spells.Sixth
|
|||
Reagent.Nightshade
|
||||
);
|
||||
|
||||
private static readonly Dictionary<Mobile, TimerExecutionToken> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, TimerExecutionToken> _table = new();
|
||||
|
||||
public InvisibilitySpell(Mobile caster, Item scroll = null) : base(caster, scroll, _info)
|
||||
{
|
||||
|
|
@ -65,7 +65,7 @@ namespace Server.Spells.Sixth
|
|||
out var timerToken
|
||||
);
|
||||
|
||||
m_Table[m] = timerToken;
|
||||
_table[m] = timerToken;
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
|
|
@ -87,11 +87,11 @@ namespace Server.Spells.Sixth
|
|||
Caster.Target = new SpellTargetMobile(this, TargetFlags.Beneficial, Core.ML ? 10 : 12);
|
||||
}
|
||||
|
||||
public static bool HasTimer(Mobile m) => m_Table.ContainsKey(m);
|
||||
public static bool HasTimer(Mobile m) => _table.ContainsKey(m);
|
||||
|
||||
public static void StopTimer(Mobile m)
|
||||
{
|
||||
if (m_Table.Remove(m, out var timerToken))
|
||||
if (_table.Remove(m, out var timerToken))
|
||||
{
|
||||
timerToken.Cancel();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace Server.Spells.Spellweaving
|
|||
-1
|
||||
);
|
||||
|
||||
private static readonly Dictionary<Mobile, ExpireTimer> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, ExpireTimer> _table = new();
|
||||
|
||||
public AttuneWeaponSpell(Mobile caster, Item scroll = null)
|
||||
: base(caster, scroll, _info)
|
||||
|
|
@ -25,7 +25,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
public override bool CheckCast()
|
||||
{
|
||||
if (m_Table.ContainsKey(Caster))
|
||||
if (_table.ContainsKey(Caster))
|
||||
{
|
||||
Caster.SendLocalizedMessage(501775); // This spell is already in effect.
|
||||
return false;
|
||||
|
|
@ -58,7 +58,7 @@ namespace Server.Spells.Spellweaving
|
|||
var t = new ExpireTimer(Caster, duration);
|
||||
t.Start();
|
||||
|
||||
m_Table[Caster] = t;
|
||||
_table[Caster] = t;
|
||||
|
||||
Caster.BeginAction<AttuneWeaponSpell>();
|
||||
|
||||
|
|
@ -94,11 +94,11 @@ namespace Server.Spells.Spellweaving
|
|||
}
|
||||
}
|
||||
|
||||
public static bool IsAbsorbing(Mobile m) => m_Table.ContainsKey(m);
|
||||
public static bool IsAbsorbing(Mobile m) => _table.ContainsKey(m);
|
||||
|
||||
public static void StopAbsorbing(Mobile m, bool message)
|
||||
{
|
||||
if (m_Table.TryGetValue(m, out var t))
|
||||
if (_table.TryGetValue(m, out var t))
|
||||
{
|
||||
t.DoExpire(message);
|
||||
}
|
||||
|
|
@ -129,7 +129,7 @@ namespace Server.Spells.Spellweaving
|
|||
m_Mobile.PlaySound(0x1F8);
|
||||
}
|
||||
|
||||
m_Table.Remove(m_Mobile);
|
||||
_table.Remove(m_Mobile);
|
||||
|
||||
StartTimer(TimeSpan.FromSeconds(120), m_Mobile.EndAction<AttuneWeaponSpell>);
|
||||
BuffInfo.RemoveBuff(m_Mobile, BuffIcon.AttuneWeapon);
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ namespace Server.Spells.Spellweaving
|
|||
{
|
||||
private static readonly SpellInfo _info = new("Essence of Wind", "Anathrae", -1);
|
||||
|
||||
private static readonly Dictionary<Mobile, EssenceOfWindTimer> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, EssenceOfWindTimer> _table = new();
|
||||
|
||||
public EssenceOfWindSpell(Mobile caster, Item scroll = null) : base(caster, scroll, _info)
|
||||
{
|
||||
|
|
@ -56,7 +56,7 @@ namespace Server.Spells.Spellweaving
|
|||
var t = new EssenceOfWindTimer(m, fcMalus, ssiMalus, duration);
|
||||
t.Start();
|
||||
|
||||
m_Table[m] = t;
|
||||
_table[m] = t;
|
||||
|
||||
BuffInfo.AddBuff(
|
||||
m,
|
||||
|
|
@ -76,15 +76,15 @@ namespace Server.Spells.Spellweaving
|
|||
FinishSequence();
|
||||
}
|
||||
|
||||
public static int GetFCMalus(Mobile m) => m_Table.TryGetValue(m, out var timer) ? timer._fcMalus : 0;
|
||||
public static int GetFCMalus(Mobile m) => _table.TryGetValue(m, out var timer) ? timer._fcMalus : 0;
|
||||
|
||||
public static int GetSSIMalus(Mobile m) => m_Table.TryGetValue(m, out var timer) ? timer._ssiMalus : 0;
|
||||
public static int GetSSIMalus(Mobile m) => _table.TryGetValue(m, out var timer) ? timer._ssiMalus : 0;
|
||||
|
||||
public static bool IsDebuffed(Mobile m) => m_Table.ContainsKey(m);
|
||||
public static bool IsDebuffed(Mobile m) => _table.ContainsKey(m);
|
||||
|
||||
public static void StopDebuffing(Mobile m, bool message)
|
||||
{
|
||||
if (m_Table.TryGetValue(m, out var timer))
|
||||
if (_table.TryGetValue(m, out var timer))
|
||||
{
|
||||
timer.DoExpire(message);
|
||||
}
|
||||
|
|
@ -111,7 +111,7 @@ namespace Server.Spells.Spellweaving
|
|||
internal void DoExpire(bool message = true)
|
||||
{
|
||||
Stop();
|
||||
m_Table.Remove(_defender);
|
||||
_table.Remove(_defender);
|
||||
|
||||
BuffInfo.RemoveBuff(_defender, BuffIcon.EssenceOfWind);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace Server.Spells.Spellweaving
|
|||
-1
|
||||
);
|
||||
|
||||
private static readonly Dictionary<Mobile, ExpireTimer> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, ExpireTimer> _table = new();
|
||||
|
||||
public GiftOfLifeSpell(Mobile caster, Item scroll = null)
|
||||
: base(caster, scroll, _info)
|
||||
|
|
@ -38,7 +38,7 @@ namespace Server.Spells.Spellweaving
|
|||
{
|
||||
Caster.SendLocalizedMessage(1072077); // You may only cast this spell on yourself or a bonded pet.
|
||||
}
|
||||
else if (m_Table.ContainsKey(m))
|
||||
else if (_table.ContainsKey(m))
|
||||
{
|
||||
Caster.SendLocalizedMessage(501775); // This spell is already in effect.
|
||||
}
|
||||
|
|
@ -65,7 +65,7 @@ namespace Server.Spells.Spellweaving
|
|||
var t = new ExpireTimer(m, duration, this);
|
||||
t.Start();
|
||||
|
||||
m_Table[m] = t;
|
||||
_table[m] = t;
|
||||
|
||||
BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.GiftOfLife, 1031615, 1075807, duration, m, null, true));
|
||||
}
|
||||
|
|
@ -85,7 +85,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
public static void HandleDeath(Mobile m)
|
||||
{
|
||||
if (m_Table.ContainsKey(m))
|
||||
if (_table.ContainsKey(m))
|
||||
{
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(Utility.RandomMinMax(2, 4)), () => HandleDeath_OnCallback(m));
|
||||
}
|
||||
|
|
@ -93,7 +93,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
private static void HandleDeath_OnCallback(Mobile m)
|
||||
{
|
||||
if (!m_Table.TryGetValue(m, out var timer))
|
||||
if (!_table.TryGetValue(m, out var timer))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -138,7 +138,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
public static void OnLogin(Mobile m)
|
||||
{
|
||||
if (m?.Alive != false || m_Table[m] == null)
|
||||
if (m?.Alive != false || _table[m] == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -169,7 +169,7 @@ namespace Server.Spells.Spellweaving
|
|||
Stop();
|
||||
|
||||
m_Mobile.SendLocalizedMessage(1074776); // You are no longer protected with Gift of Life.
|
||||
m_Table.Remove(m_Mobile);
|
||||
_table.Remove(m_Mobile);
|
||||
|
||||
BuffInfo.RemoveBuff(m_Mobile, BuffIcon.GiftOfLife);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace Server.Spells.Spellweaving
|
|||
-1
|
||||
);
|
||||
|
||||
private static readonly Dictionary<Mobile, GiftOfRenewalTimer> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, GiftOfRenewalTimer> _table = new();
|
||||
|
||||
public GiftOfRenewalSpell(Mobile caster, Item scroll = null)
|
||||
: base(caster, scroll, _info)
|
||||
|
|
@ -26,7 +26,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
public void Target(Mobile m)
|
||||
{
|
||||
if (m_Table.ContainsKey(m))
|
||||
if (_table.ContainsKey(m))
|
||||
{
|
||||
Caster.SendLocalizedMessage(501775); // This spell is already in effect.
|
||||
}
|
||||
|
|
@ -54,7 +54,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
var t = new GiftOfRenewalTimer(Caster, m, hitsPerRound, duration);
|
||||
|
||||
m_Table[m] = t;
|
||||
_table[m] = t;
|
||||
|
||||
t.Start();
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ namespace Server.Spells.Spellweaving
|
|||
{
|
||||
BuffInfo.RemoveBuff(m, BuffIcon.GiftOfRenewal);
|
||||
|
||||
if (m_Table.Remove(m, out var timer))
|
||||
if (_table.Remove(m, out var timer))
|
||||
{
|
||||
timer.Stop();
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(60), timer.m_Caster.EndAction<GiftOfRenewalSpell>);
|
||||
|
|
@ -115,7 +115,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
var m = m_Mobile;
|
||||
|
||||
if (!m_Table.ContainsKey(m))
|
||||
if (!_table.ContainsKey(m))
|
||||
{
|
||||
Stop();
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace Server.Spells.Spellweaving
|
|||
-1
|
||||
);
|
||||
|
||||
private static readonly Dictionary<BaseWeapon, ImmolatingWeaponTimer> m_Table = new();
|
||||
private static readonly Dictionary<BaseWeapon, ImmolatingWeaponTimer> _table = new();
|
||||
|
||||
public ImmolatingWeaponSpell(Mobile caster, Item scroll = null)
|
||||
: base(caster, scroll, _info)
|
||||
|
|
@ -54,7 +54,7 @@ namespace Server.Spells.Spellweaving
|
|||
var damage = 5 + (int)(skill / 24) + FocusLevel;
|
||||
|
||||
var t = new ImmolatingWeaponTimer(TimeSpan.FromSeconds(duration), damage, Caster, weapon);
|
||||
m_Table[weapon] = t;
|
||||
_table[weapon] = t;
|
||||
t.Start();
|
||||
|
||||
weapon.InvalidateProperties();
|
||||
|
|
@ -64,14 +64,14 @@ namespace Server.Spells.Spellweaving
|
|||
FinishSequence();
|
||||
}
|
||||
|
||||
public static bool IsImmolating(BaseWeapon weapon) => m_Table.ContainsKey(weapon);
|
||||
public static bool IsImmolating(BaseWeapon weapon) => _table.ContainsKey(weapon);
|
||||
|
||||
public static int GetImmolatingDamage(BaseWeapon weapon) =>
|
||||
m_Table.TryGetValue(weapon, out var entry) ? entry._damage : 0;
|
||||
_table.TryGetValue(weapon, out var entry) ? entry._damage : 0;
|
||||
|
||||
public static void DoEffect(BaseWeapon weapon, Mobile target)
|
||||
{
|
||||
if (m_Table.Remove(weapon, out var timer))
|
||||
if (_table.Remove(weapon, out var timer))
|
||||
{
|
||||
timer.Stop();
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
public static void StopImmolating(BaseWeapon weapon)
|
||||
{
|
||||
if (m_Table.Remove(weapon, out var timer))
|
||||
if (_table.Remove(weapon, out var timer))
|
||||
{
|
||||
timer._caster?.PlaySound(0x27);
|
||||
timer.Stop();
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace Server.Spells.Spellweaving
|
|||
-1
|
||||
);
|
||||
|
||||
private static readonly Dictionary<Mobile, TimerExecutionToken> m_Table = new();
|
||||
private static readonly Dictionary<Mobile, TimerExecutionToken> _table = new();
|
||||
|
||||
public ThunderstormSpell(Mobile caster, Item scroll = null)
|
||||
: base(caster, scroll, _info)
|
||||
|
|
@ -66,7 +66,7 @@ namespace Server.Spells.Spellweaving
|
|||
StopTimer(m);
|
||||
|
||||
Timer.StartTimer(duration, () => DoExpire(m), out var timerToken);
|
||||
m_Table[m] = timerToken;
|
||||
_table[m] = timerToken;
|
||||
|
||||
BuffInfo.AddBuff(
|
||||
m,
|
||||
|
|
@ -80,11 +80,11 @@ namespace Server.Spells.Spellweaving
|
|||
FinishSequence();
|
||||
}
|
||||
|
||||
public static int GetCastRecoveryMalus(Mobile m) => m_Table.ContainsKey(m) ? 6 : 0;
|
||||
public static int GetCastRecoveryMalus(Mobile m) => _table.ContainsKey(m) ? 6 : 0;
|
||||
|
||||
private static void StopTimer(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