Modernization Fixes & Updates to Default Values (#3)

This commit is contained in:
Kamron Batman 2018-10-28 00:33:16 -07:00 committed by GitHub
parent 445eddff68
commit dcf64091b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
768 changed files with 10507 additions and 14196 deletions

View file

@ -1,5 +1,6 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Server.Targeting;
namespace Server.Spells.Necromancy
@ -14,7 +15,7 @@ namespace Server.Spells.Necromancy
Reagent.NoxCrystal
);
private static Hashtable m_Table = new Hashtable();
private static Dictionary<Mobile, InternalTimer> m_Table = new Dictionary<Mobile, InternalTimer>();
public StrangleSpell(Mobile caster, Item scroll) : base(caster, scroll, m_Info)
{
@ -58,19 +59,19 @@ 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.Contains(m))
{
Timer t = new InternalTimer(m, Caster);
t.Start();
InternalTimer timer = m_Table[m];
m_Table[m] = t;
if (timer == null)
{
m_Table[m] = timer = new InternalTimer(m, Caster);
timer.Start();
}
HarmfulSpell(m);
}
//Calculations for the buff bar
double spiritlevel = Caster.Skills[SkillName.SpiritSpeak].Value / 10;
double spiritlevel = Caster.Skills.SpiritSpeak.Value / 10;
if (spiritlevel < 4)
spiritlevel = 4;
int d_MinDamage = 4;
@ -95,10 +96,7 @@ namespace Server.Spells.Necromancy
{
int delay = (int)Math.Ceiling((1.0 + 5 * i_Count) / i_MaxCount);
if (delay <= 5)
i_HitDelay = delay;
else
i_HitDelay = 5;
i_HitDelay = delay <= 5 ? delay : 5;
}
}
@ -113,12 +111,12 @@ namespace Server.Spells.Necromancy
public static bool RemoveCurse(Mobile m)
{
Timer t = (Timer)m_Table[m];
Timer timer = m_Table[m];
if (t == null)
if (timer == null)
return false;
t.Stop();
timer.Stop();
m.SendLocalizedMessage(1061687); // You can breath normally again.
m_Table.Remove(m);
@ -141,7 +139,7 @@ namespace Server.Spells.Necromancy
m_Target = target;
m_From = from;
double spiritLevel = from.Skills[SkillName.SpiritSpeak].Value / 10;
double spiritLevel = from.Skills.SpiritSpeak.Value / 10;
m_MinBaseDamage = spiritLevel - 2;
m_MaxBaseDamage = spiritLevel + 1;
@ -237,4 +235,4 @@ namespace Server.Spells.Necromancy
}
}
}
}
}