Fixes dictionary uses (#7)

This commit is contained in:
Kamron Batman 2018-11-02 08:16:42 -07:00 committed by GitHub
parent d4a52344f2
commit 916d404c51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
161 changed files with 1211 additions and 1722 deletions

View file

@ -1041,7 +1041,7 @@ namespace Server.Spells
if (context == null) /* cleanup */
return;
if (context.Type == typeof(WraithFormSpell))
{
int wraithLeech =
@ -1137,7 +1137,7 @@ namespace Server.Spells
{
BaseCreature bcFrom = m_From as BaseCreature;
BaseCreature bcTarg = m_Target as BaseCreature;
if (bcFrom != null && m_Target != null)
bcFrom.AlterSpellDamageTo(m_Target, ref m_Damage);
@ -1299,24 +1299,24 @@ namespace Server.Spells
public static void RemoveContext(Mobile m, TransformContext context, bool resetGraphics)
{
if (m_Table.ContainsKey(m))
if (!m_Table.ContainsKey(m))
return;
m_Table.Remove(m);
List<ResistanceMod> mods = context.Mods;
for (int i = 0; i < mods.Count; ++i)
m.RemoveResistanceMod(mods[i]);
if (resetGraphics)
{
m_Table.Remove(m);
List<ResistanceMod> mods = context.Mods;
for (int i = 0; i < mods.Count; ++i)
m.RemoveResistanceMod(mods[i]);
if (resetGraphics)
{
m.HueMod = -1;
m.BodyMod = 0;
}
context.Timer.Stop();
context.Spell.RemoveEffect(m);
m.HueMod = -1;
m.BodyMod = 0;
}
context.Timer.Stop();
context.Spell.RemoveEffect(m);
}
public static TransformContext GetContext(Mobile m)
@ -1406,4 +1406,4 @@ namespace Server.Spells
}
}
}
}
}