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.Items;
namespace Server.Spells.Necromancy
@ -13,7 +14,7 @@ namespace Server.Spells.Necromancy
Reagent.PigIron
);
private static Hashtable m_Table = new Hashtable();
private static Dictionary<BaseWeapon, ExpireTimer> m_Table = new Dictionary<BaseWeapon, ExpireTimer>();
public CurseWeaponSpell(Mobile caster, Item scroll) : base(caster, scroll, m_Info)
{
@ -47,18 +48,17 @@ namespace Server.Spells.Necromancy
Caster.FixedParticles(0x37B9, 1, 14, 9502, 32, 5, (EffectLayer)255);
new SoundEffectTimer(Caster).Start();
TimeSpan duration = TimeSpan.FromSeconds(Caster.Skills[SkillName.SpiritSpeak].Value / 3.4 + 1.0);
TimeSpan duration = TimeSpan.FromSeconds(Caster.Skills.SpiritSpeak.Value / 3.4 + 1.0);
Timer t = (Timer)m_Table[weapon];
t?.Stop();
ExpireTimer timer = m_Table[weapon];
timer?.Stop();
weapon.Cursed = true;
m_Table[weapon] = t = new ExpireTimer(weapon, duration);
m_Table[weapon] = timer = new ExpireTimer(weapon, duration);
t.Start();
timer.Start();
}
FinishSequence();
@ -78,7 +78,7 @@ namespace Server.Spells.Necromancy
{
m_Weapon.Cursed = false;
Effects.PlaySound(m_Weapon.GetWorldLocation(), m_Weapon.Map, 0xFA);
m_Table.Remove(this);
m_Table.Remove(m_Weapon);
}
}
@ -98,4 +98,4 @@ namespace Server.Spells.Necromancy
}
}
}
}
}