fix: More spell variable cleanup (#850)
This commit is contained in:
parent
5df7bf6a75
commit
15b2d08ea2
35 changed files with 162 additions and 162 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue