Modernization Fixes & Updates to Default Values (#3)
This commit is contained in:
parent
445eddff68
commit
dcf64091b1
768 changed files with 10507 additions and 14196 deletions
|
|
@ -58,7 +58,7 @@ namespace Server.Spells.Chivalry
|
|||
if (p != null)
|
||||
{
|
||||
// Cleanse by fire is now difficulty based
|
||||
int chanceToCure = 10000 + (int)(Caster.Skills[SkillName.Chivalry].Value * 75) - (p.Level + 1) * 2000;
|
||||
int chanceToCure = 10000 + (int)(Caster.Skills.Chivalry.Value * 75) - (p.Level + 1) * 2000;
|
||||
chanceToCure /= 100;
|
||||
|
||||
if (chanceToCure > Utility.Random(100))
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Spells.Chivalry
|
||||
|
|
@ -12,7 +13,7 @@ namespace Server.Spells.Chivalry
|
|||
9002
|
||||
);
|
||||
|
||||
private static Hashtable m_Table = new Hashtable();
|
||||
private static Dictionary<BaseWeapon, ExpireTimer> m_Table = new Dictionary<BaseWeapon, ExpireTimer>();
|
||||
|
||||
public ConsecrateWeaponSpell(Mobile caster, Item scroll) : base(caster, scroll, m_Info)
|
||||
{
|
||||
|
|
@ -77,15 +78,14 @@ namespace Server.Spells.Chivalry
|
|||
|
||||
TimeSpan duration = TimeSpan.FromSeconds(seconds);
|
||||
|
||||
Timer t = (Timer)m_Table[weapon];
|
||||
|
||||
t?.Stop();
|
||||
ExpireTimer timer = m_Table[weapon];
|
||||
timer?.Stop();
|
||||
|
||||
weapon.Consecrated = true;
|
||||
|
||||
m_Table[weapon] = t = new ExpireTimer(weapon, duration);
|
||||
m_Table[weapon] = timer = new ExpireTimer(weapon, duration);
|
||||
|
||||
t.Start();
|
||||
timer.Start();
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
|
|
@ -105,8 +105,8 @@ namespace Server.Spells.Chivalry
|
|||
{
|
||||
m_Weapon.Consecrated = false;
|
||||
Effects.PlaySound(m_Weapon.GetWorldLocation(), m_Weapon.Map, 0x1F8);
|
||||
m_Table.Remove(this);
|
||||
m_Table.Remove(m_Weapon);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Spells.Chivalry
|
||||
{
|
||||
|
|
@ -11,7 +12,7 @@ namespace Server.Spells.Chivalry
|
|||
9002
|
||||
);
|
||||
|
||||
private static Hashtable m_Table = new Hashtable();
|
||||
private static Dictionary<Mobile, Timer> m_Table = new Dictionary<Mobile, Timer>();
|
||||
|
||||
public DivineFurySpell(Mobile caster, Item scroll) : base(caster, scroll, m_Info)
|
||||
{
|
||||
|
|
@ -36,9 +37,8 @@ namespace Server.Spells.Chivalry
|
|||
|
||||
Caster.Stam = Caster.StamMax;
|
||||
|
||||
Timer t = (Timer)m_Table[Caster];
|
||||
|
||||
t?.Stop();
|
||||
Timer timer = m_Table[Caster];
|
||||
timer?.Stop();
|
||||
|
||||
int delay = ComputePowerValue(10);
|
||||
|
||||
|
|
@ -48,8 +48,7 @@ namespace Server.Spells.Chivalry
|
|||
else if (delay > 24)
|
||||
delay = 24;
|
||||
|
||||
m_Table[Caster] = t = Timer.DelayCall(TimeSpan.FromSeconds(delay), new TimerStateCallback(Expire_Callback),
|
||||
Caster);
|
||||
m_Table[Caster] = Timer.DelayCall(TimeSpan.FromSeconds(delay), Expire_Callback, Caster);
|
||||
Caster.Delta(MobileDelta.WeaponDamage);
|
||||
|
||||
BuffInfo.AddBuff(Caster,
|
||||
|
|
@ -61,17 +60,15 @@ namespace Server.Spells.Chivalry
|
|||
|
||||
public static bool UnderEffect(Mobile m)
|
||||
{
|
||||
return m_Table.Contains(m);
|
||||
return m_Table.ContainsKey(m);
|
||||
}
|
||||
|
||||
private static void Expire_Callback(object state)
|
||||
private static void Expire_Callback(Mobile m)
|
||||
{
|
||||
Mobile m = (Mobile)state;
|
||||
|
||||
m_Table.Remove(m);
|
||||
|
||||
m.Delta(MobileDelta.WeaponDamage);
|
||||
m.PlaySound(0xF8);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Spells.Chivalry
|
||||
|
|
@ -12,7 +13,7 @@ namespace Server.Spells.Chivalry
|
|||
9002
|
||||
);
|
||||
|
||||
private static Hashtable m_Table = new Hashtable();
|
||||
private static Dictionary<Mobile, Timer> m_Table = new Dictionary<Mobile, Timer>();
|
||||
|
||||
public EnemyOfOneSpell(Mobile caster, Item scroll) : base(caster, scroll, m_Info)
|
||||
{
|
||||
|
|
@ -35,9 +36,8 @@ namespace Server.Spells.Chivalry
|
|||
Caster.FixedParticles(0x375A, 1, 30, 9966, 33, 2, EffectLayer.Head);
|
||||
Caster.FixedParticles(0x37B9, 1, 30, 9502, 43, 3, EffectLayer.Head);
|
||||
|
||||
Timer t = (Timer)m_Table[Caster];
|
||||
|
||||
t?.Stop();
|
||||
Timer timer = m_Table[Caster];
|
||||
timer?.Stop();
|
||||
|
||||
double delay = (double)ComputePowerValue(1) / 60;
|
||||
|
||||
|
|
@ -47,8 +47,7 @@ namespace Server.Spells.Chivalry
|
|||
else if (delay > 3.5)
|
||||
delay = 3.5;
|
||||
|
||||
m_Table[Caster] = Timer.DelayCall(TimeSpan.FromMinutes(delay), new TimerStateCallback(Expire_Callback),
|
||||
Caster);
|
||||
m_Table[Caster] = Timer.DelayCall(TimeSpan.FromMinutes(delay), Expire_Callback, Caster);
|
||||
|
||||
if (Caster is PlayerMobile mobile)
|
||||
{
|
||||
|
|
@ -63,10 +62,8 @@ namespace Server.Spells.Chivalry
|
|||
FinishSequence();
|
||||
}
|
||||
|
||||
private static void Expire_Callback(object state)
|
||||
private static void Expire_Callback(Mobile m)
|
||||
{
|
||||
Mobile m = (Mobile)state;
|
||||
|
||||
m_Table.Remove(m);
|
||||
|
||||
m.PlaySound(0x1F8);
|
||||
|
|
@ -78,4 +75,4 @@ namespace Server.Spells.Chivalry
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ namespace Server.Spells.Chivalry
|
|||
|
||||
if (!m.Alive)
|
||||
{
|
||||
if (m.Region != null && m.Region.IsPartOf("Khaldun"))
|
||||
if (m.Region?.IsPartOf("Khaldun") == true)
|
||||
{
|
||||
Caster.SendLocalizedMessage(
|
||||
1010395); // The veil of death in this area is too strong and resists thy efforts to restore life.
|
||||
|
|
@ -70,7 +70,7 @@ namespace Server.Spells.Chivalry
|
|||
else if (resChance > Utility.RandomDouble())
|
||||
{
|
||||
m.FixedParticles(0x375A, 1, 15, 5005, 5, 3, EffectLayer.Head);
|
||||
m.CloseGump(typeof(ResurrectGump));
|
||||
m.CloseGump<ResurrectGump>();
|
||||
m.SendGump(new ResurrectGump(m, Caster));
|
||||
sacrifice = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue