Adds style cop (#109)
This commit is contained in:
parent
3e715bcb60
commit
556a17aba8
1725 changed files with 33831 additions and 38046 deletions
|
|
@ -14,7 +14,7 @@ namespace Server.Items
|
|||
/// </summary>
|
||||
public class BleedAttack : WeaponAbility
|
||||
{
|
||||
private static Dictionary<Mobile, Timer> m_Table = new Dictionary<Mobile, Timer>();
|
||||
private static readonly Dictionary<Mobile, Timer> m_Table = new Dictionary<Mobile, Timer>();
|
||||
|
||||
public override int BaseMana => 30;
|
||||
|
||||
|
|
@ -28,8 +28,8 @@ namespace Server.Items
|
|||
// Necromancers under Lich or Wraith Form are immune to Bleed Attacks.
|
||||
TransformContext context = TransformationSpellHelper.GetContext(defender);
|
||||
|
||||
if (context != null && (context.Type == typeof(LichFormSpell) || context.Type == typeof(WraithFormSpell)) ||
|
||||
defender is BaseCreature creature && creature.BleedImmune)
|
||||
if ((context != null && (context.Type == typeof(LichFormSpell) || context.Type == typeof(WraithFormSpell))) ||
|
||||
(defender is BaseCreature creature && creature.BleedImmune))
|
||||
{
|
||||
attacker.SendLocalizedMessage(1062052); // Your target is not affected by the bleed attack!
|
||||
return;
|
||||
|
|
@ -98,8 +98,8 @@ namespace Server.Items
|
|||
private class InternalTimer : Timer
|
||||
{
|
||||
private int m_Count;
|
||||
private Mobile m_From;
|
||||
private Mobile m_Mobile;
|
||||
private readonly Mobile m_From;
|
||||
private readonly Mobile m_Mobile;
|
||||
|
||||
public InternalTimer(Mobile from, Mobile m) : base(TimeSpan.FromSeconds(2.0), TimeSpan.FromSeconds(2.0))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace Server.Items
|
|||
/// </summary>
|
||||
public class Block : WeaponAbility
|
||||
{
|
||||
private static Dictionary<Mobile, BlockInfo> m_Table = new Dictionary<Mobile, BlockInfo>();
|
||||
private static readonly Dictionary<Mobile, BlockInfo> m_Table = new Dictionary<Mobile, BlockInfo>();
|
||||
|
||||
public override int BaseMana => 30;
|
||||
|
||||
|
|
@ -68,8 +68,8 @@ namespace Server.Items
|
|||
|
||||
private class BlockInfo
|
||||
{
|
||||
public int m_Bonus;
|
||||
public Timer m_Timer;
|
||||
public readonly int m_Bonus;
|
||||
public readonly Timer m_Timer;
|
||||
|
||||
public BlockInfo(Mobile target, int bonus)
|
||||
{
|
||||
|
|
@ -80,7 +80,7 @@ namespace Server.Items
|
|||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private Mobile m_Mobile;
|
||||
private readonly Mobile m_Mobile;
|
||||
|
||||
public InternalTimer(Mobile m) : base(TimeSpan.FromSeconds(6.0))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ namespace Server.Items
|
|||
public override int BaseMana => 25;
|
||||
public override double DamageScalar => 1.5;
|
||||
|
||||
|
||||
public override void OnHit(Mobile attacker, Mobile defender, int damage)
|
||||
{
|
||||
if (!Validate(attacker) || !CheckMana(attacker, true))
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace Server.Items
|
|||
/// </summary>
|
||||
public class DefenseMastery : WeaponAbility
|
||||
{
|
||||
private static Dictionary<Mobile, DefenseMasteryInfo> m_Table = new Dictionary<Mobile, DefenseMasteryInfo>();
|
||||
private static readonly Dictionary<Mobile, DefenseMasteryInfo> m_Table = new Dictionary<Mobile, DefenseMasteryInfo>();
|
||||
|
||||
public override int BaseMana => 30;
|
||||
|
||||
|
|
@ -80,9 +80,9 @@ namespace Server.Items
|
|||
|
||||
private class DefenseMasteryInfo
|
||||
{
|
||||
public int m_DamageMalus;
|
||||
public Mobile m_From;
|
||||
public ResistanceMod m_Mod;
|
||||
public readonly int m_DamageMalus;
|
||||
public readonly Mobile m_From;
|
||||
public readonly ResistanceMod m_Mod;
|
||||
public Timer m_Timer;
|
||||
|
||||
public DefenseMasteryInfo(Mobile from, int damageMalus, ResistanceMod mod)
|
||||
|
|
|
|||
|
|
@ -15,15 +15,15 @@ namespace Server.Items
|
|||
// No longer active in pub21:
|
||||
/*public override bool CheckSkills( Mobile from )
|
||||
{
|
||||
if ( !base.CheckSkills( from ) )
|
||||
if (!base.CheckSkills( from ))
|
||||
return false;
|
||||
|
||||
if ( !(from.Weapon is Fists) )
|
||||
if (!(from.Weapon is Fists))
|
||||
return true;
|
||||
|
||||
Skill skill = from.Skills.ArmsLore;
|
||||
|
||||
if ( skill?.Base >= 80.0 )
|
||||
if (skill?.Base >= 80.0)
|
||||
return true;
|
||||
|
||||
from.SendLocalizedMessage( 1061812 ); // You lack the required skill in armslore to perform that attack!
|
||||
|
|
@ -57,7 +57,7 @@ namespace Server.Items
|
|||
{
|
||||
attacker.SendLocalizedMessage(1004001); // You cannot disarm your opponent.
|
||||
}
|
||||
else if (!Core.ML && toDisarm == null || toDisarm is BaseShield || toDisarm is Spellbook)
|
||||
else if ((!Core.ML && toDisarm == null) || toDisarm is BaseShield || toDisarm is Spellbook)
|
||||
{
|
||||
attacker.SendLocalizedMessage(1060849); // Your target is already unarmed!
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,8 +38,7 @@ namespace Server.Items
|
|||
if (defender is ChaosDragoon || defender is ChaosDragoonElite)
|
||||
return;
|
||||
|
||||
if (attacker.Mounted && (!(attacker.Weapon is Lance) || !(defender.Weapon is Lance))
|
||||
) // TODO: Should there be a message here?
|
||||
if (attacker.Mounted && (!(attacker.Weapon is Lance) || !(defender.Weapon is Lance))) // TODO: Should there be a message here?
|
||||
return;
|
||||
|
||||
ClearCurrentAbility(attacker);
|
||||
|
|
@ -55,8 +54,8 @@ namespace Server.Items
|
|||
if (!CheckMana(attacker, true))
|
||||
return;
|
||||
|
||||
if (Core.ML && attacker is LesserHiryu && 0.8 >= Utility.RandomDouble())
|
||||
return; //Lesser Hiryu have an 80% chance of missing this attack
|
||||
if (Core.ML && attacker is LesserHiryu && Utility.RandomDouble() <= 0.8)
|
||||
return; // Lesser Hiryu have an 80% chance of missing this attack
|
||||
|
||||
attacker.SendLocalizedMessage(1060082); // The force of your attack has dislodged them from their mount!
|
||||
|
||||
|
|
|
|||
|
|
@ -30,11 +30,11 @@ namespace Server.Items
|
|||
}
|
||||
else if (CheckMana(attacker, true))
|
||||
{
|
||||
//attacker.SendLocalizedMessage( 1060092 ); // You disarm their weapon!
|
||||
// attacker.SendLocalizedMessage( 1060092 ); // You disarm their weapon!
|
||||
defender.SendLocalizedMessage(1062002); // You can no longer wear your ~1_ARMOR~
|
||||
|
||||
defender.PlaySound(0x3B9);
|
||||
//defender.FixedParticles( 0x37BE, 232, 25, 9948, EffectLayer.InnerTorso );
|
||||
// defender.FixedParticles( 0x37BE, 232, 25, 9948, EffectLayer.InnerTorso );
|
||||
|
||||
pack.DropItem(toDisrobe);
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ namespace Server.Items
|
|||
|
||||
public void Use(Mobile attacker, Mobile defender)
|
||||
{
|
||||
if (!Validate(attacker) || !CheckMana(attacker, true) || attacker.Weapon == null) //sanity
|
||||
if (!Validate(attacker) || !CheckMana(attacker, true) || attacker.Weapon == null) // sanity
|
||||
return;
|
||||
|
||||
ClearCurrentAbility(attacker);
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace Server.Items
|
|||
|
||||
IWeapon weapon = attacker.Weapon;
|
||||
|
||||
if (!(weapon != null && attacker.InRange(defender, weapon.MaxRange) &&attacker.InLOS(defender)))
|
||||
if (!(weapon != null && attacker.InRange(defender, weapon.MaxRange) && attacker.InLOS(defender)))
|
||||
return;
|
||||
|
||||
BaseWeapon.InDoubleStrike = true;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace Server.Items
|
|||
/// </summary>
|
||||
public class DualWield : WeaponAbility
|
||||
{
|
||||
public static Dictionary<Mobile, DualWieldTimer> Registry{ get; } = new Dictionary<Mobile, DualWieldTimer>();
|
||||
public static Dictionary<Mobile, DualWieldTimer> Registry { get; } = new Dictionary<Mobile, DualWieldTimer>();
|
||||
|
||||
public override int BaseMana => 30;
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ namespace Server.Items
|
|||
attacker.FixedParticles(0x3779, 1, 15, 0x7F6, 0x3E8, 3, EffectLayer.LeftHand);
|
||||
|
||||
timer = new DualWieldTimer(attacker,
|
||||
(int)(20.0 + 3.0 * (attacker.Skills.Ninjitsu.Value - 50.0) / 7.0)); //20-50 % increase
|
||||
(int)(20.0 + 3.0 * (attacker.Skills.Ninjitsu.Value - 50.0) / 7.0)); // 20-50 % increase
|
||||
|
||||
timer.Start();
|
||||
Registry.Add(attacker, timer);
|
||||
|
|
@ -49,7 +49,7 @@ namespace Server.Items
|
|||
|
||||
public class DualWieldTimer : Timer
|
||||
{
|
||||
private Mobile m_Owner;
|
||||
private readonly Mobile m_Owner;
|
||||
|
||||
public DualWieldTimer(Mobile owner, int bonusSwingSpeed)
|
||||
: base(TimeSpan.FromSeconds(6.0))
|
||||
|
|
@ -59,7 +59,7 @@ namespace Server.Items
|
|||
Priority = TimerPriority.FiftyMS;
|
||||
}
|
||||
|
||||
public int BonusSwingSpeed{ get; }
|
||||
public int BonusSwingSpeed { get; }
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace Server.Items
|
|||
/// </summary>
|
||||
public class Feint : WeaponAbility
|
||||
{
|
||||
public static Dictionary<Mobile, FeintTimer> Registry{ get; } = new Dictionary<Mobile, FeintTimer>();
|
||||
public static Dictionary<Mobile, FeintTimer> Registry { get; } = new Dictionary<Mobile, FeintTimer>();
|
||||
|
||||
public override int BaseMana => 30;
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ namespace Server.Items
|
|||
|
||||
timer = new FeintTimer(defender,
|
||||
(int)(20.0 + 3.0 * (Math.Max(attacker.Skills.Ninjitsu.Value,
|
||||
attacker.Skills.Bushido.Value) - 50.0) / 7.0)); //20-50 % decrease
|
||||
attacker.Skills.Bushido.Value) - 50.0) / 7.0)); // 20-50 % decrease
|
||||
|
||||
timer.Start();
|
||||
Registry.Add(defender, timer);
|
||||
|
|
@ -52,7 +52,7 @@ namespace Server.Items
|
|||
|
||||
public class FeintTimer : Timer
|
||||
{
|
||||
private Mobile m_Defender;
|
||||
private readonly Mobile m_Defender;
|
||||
|
||||
public FeintTimer(Mobile defender, int swingSpeedReduction)
|
||||
: base(TimeSpan.FromSeconds(6.0))
|
||||
|
|
@ -62,7 +62,7 @@ namespace Server.Items
|
|||
Priority = TimerPriority.FiftyMS;
|
||||
}
|
||||
|
||||
public int SwingSpeedReduction{ get; }
|
||||
public int SwingSpeedReduction { get; }
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace Server.Items
|
|||
{
|
||||
public override int BaseMana => 30;
|
||||
|
||||
public static Dictionary<Mobile, FrenziedWirlwindTimer> Registry{ get; } = new Dictionary<Mobile, FrenziedWirlwindTimer>();
|
||||
public static Dictionary<Mobile, FrenziedWirlwindTimer> Registry { get; } = new Dictionary<Mobile, FrenziedWirlwindTimer>();
|
||||
|
||||
public override bool CheckSkills(Mobile from)
|
||||
{
|
||||
|
|
@ -28,7 +28,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnHit(Mobile attacker, Mobile defender, int damage)
|
||||
{
|
||||
if (!Validate(attacker)) //Mana check after check that there are targets
|
||||
if (!Validate(attacker)) // Mana check after check that there are targets
|
||||
return;
|
||||
|
||||
ClearCurrentAbility(attacker);
|
||||
|
|
@ -81,10 +81,10 @@ namespace Server.Items
|
|||
public class FrenziedWirlwindTimer : Timer
|
||||
{
|
||||
private readonly double DamagePerTick;
|
||||
private Mobile m_Attacker;
|
||||
private readonly Mobile m_Attacker;
|
||||
private double m_DamageRemaining;
|
||||
private double m_DamageToDo;
|
||||
private Mobile m_Defender;
|
||||
private readonly Mobile m_Defender;
|
||||
|
||||
public FrenziedWirlwindTimer(Mobile attacker, Mobile defender, int totalDamage)
|
||||
: base(TimeSpan.Zero, TimeSpan.FromSeconds(0.25),
|
||||
|
|
@ -112,7 +112,7 @@ namespace Server.Items
|
|||
m_DamageToDo += DamagePerTick;
|
||||
|
||||
if (m_DamageRemaining <= 0 && m_DamageToDo < 1)
|
||||
m_DamageToDo = 1.0; //Confirm this 'round up' at the end
|
||||
m_DamageToDo = 1.0; // Confirm this 'round up' at the end
|
||||
|
||||
int damage = (int)m_DamageToDo;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Server.Items
|
|||
public static readonly TimeSpan PlayerDuration = TimeSpan.FromSeconds(6.0);
|
||||
public static readonly TimeSpan NPCDuration = TimeSpan.FromSeconds(12.0);
|
||||
|
||||
private static Dictionary<Mobile, InternalTimer> m_Table = new Dictionary<Mobile, InternalTimer>();
|
||||
private static readonly Dictionary<Mobile, InternalTimer> m_Table = new Dictionary<Mobile, InternalTimer>();
|
||||
|
||||
public override int BaseMana => 30;
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ namespace Server.Items
|
|||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private Mobile m_Mobile;
|
||||
private readonly Mobile m_Mobile;
|
||||
|
||||
public InternalTimer(Mobile m, TimeSpan duration) : base(duration)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnMiss(Mobile attacker, Mobile defender)
|
||||
{
|
||||
//Validates in OnSwing for accuracy scalar
|
||||
// Validates in OnSwing for accuracy scalar
|
||||
|
||||
ClearCurrentAbility(attacker);
|
||||
|
||||
|
|
@ -24,7 +24,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnHit(Mobile attacker, Mobile defender, int damage)
|
||||
{
|
||||
//Validates in OnSwing for accuracy scalar
|
||||
// Validates in OnSwing for accuracy scalar
|
||||
|
||||
ClearCurrentAbility(attacker);
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ namespace Server.Items
|
|||
{
|
||||
AOS.Damage(defender, attacker,
|
||||
(int)(15.0 * (attacker.Skills.Bushido.Value - 50.0) / 70.0 + Utility.Random(10)), true, 100,
|
||||
0, 0, 0, 0); //0-25
|
||||
0, 0, 0, 0); // 0-25
|
||||
|
||||
if (!cantpara && (150.0 / 7.0 + 4.0 * attacker.Skills.Bushido.Value / 7.0) / 100.0 >
|
||||
Utility.RandomDouble())
|
||||
|
|
@ -72,7 +72,7 @@ namespace Server.Items
|
|||
else if (!cantpara)
|
||||
{
|
||||
AOS.Damage(defender, attacker, (int)(15.0 * (attacker.Skills.Bushido.Value - 50.0) / 70.0 + 10),
|
||||
true, 100, 0, 0, 0, 0); //10-25
|
||||
true, 100, 0, 0, 0, 0); // 10-25
|
||||
defender.Freeze(TimeSpan.FromSeconds(2.0));
|
||||
Items.ParalyzingBlow.BeginImmunity(defender, Items.ParalyzingBlow.FreezeDelayDuration);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,22 +13,22 @@ namespace Server.Items
|
|||
|
||||
public static readonly TimeSpan FreezeDelayDuration = TimeSpan.FromSeconds(8.0);
|
||||
|
||||
private static Dictionary<Mobile, InternalTimer> m_Table = new Dictionary<Mobile, InternalTimer>();
|
||||
private static readonly Dictionary<Mobile, InternalTimer> m_Table = new Dictionary<Mobile, InternalTimer>();
|
||||
|
||||
public override int BaseMana => 30;
|
||||
|
||||
// No longer active in pub21:
|
||||
/*public override bool CheckSkills( Mobile from )
|
||||
{
|
||||
if ( !base.CheckSkills( from ) )
|
||||
if (!base.CheckSkills( from ))
|
||||
return false;
|
||||
|
||||
if ( !(from.Weapon is Fists) )
|
||||
if (!(from.Weapon is Fists))
|
||||
return true;
|
||||
|
||||
Skill skill = from.Skills.Anatomy;
|
||||
|
||||
if ( skill?.Base >= 80.0 )
|
||||
if (skill?.Base >= 80.0)
|
||||
return true;
|
||||
|
||||
from.SendLocalizedMessage( 1061811 ); // You lack the required anatomy skill to perform that attack!
|
||||
|
|
@ -56,7 +56,7 @@ namespace Server.Items
|
|||
|
||||
ClearCurrentAbility(attacker);
|
||||
|
||||
if (IsImmune(defender)) //Intentionally going after Mana consumption
|
||||
if (IsImmune(defender)) // Intentionally going after Mana consumption
|
||||
{
|
||||
attacker.SendLocalizedMessage(1070804); // Your target resists paralysis.
|
||||
defender.SendLocalizedMessage(1070813); // You resist paralysis.
|
||||
|
|
@ -99,7 +99,7 @@ namespace Server.Items
|
|||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private Mobile m_Mobile;
|
||||
private readonly Mobile m_Mobile;
|
||||
|
||||
public InternalTimer(Mobile m, TimeSpan duration) : base(duration)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -45,14 +45,14 @@ namespace Server.Items
|
|||
Mobile mount = defender.Mount as Mobile;
|
||||
BaseMount.Dismount(defender);
|
||||
|
||||
if (mount != null) //Ethy mounts don't take damage
|
||||
if (mount != null) // Ethy mounts don't take damage
|
||||
{
|
||||
int amount = 10 + (int)(10.0 * (attacker.Skills.Bushido.Value - 50.0) / 70.0 + 5);
|
||||
|
||||
AOS.Damage(mount, null, amount, 100, 0, 0, 0,
|
||||
0); //The mount just takes damage, there's no flagging as if it was attacking the mount directly
|
||||
0); // The mount just takes damage, there's no flagging as if it was attacking the mount directly
|
||||
|
||||
//TODO: Mount prevention until mount healed
|
||||
// TODO: Mount prevention until mount healed
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -61,7 +61,7 @@ namespace Server.Items
|
|||
|
||||
AOS.Damage(defender, attacker, amount, 100, 0, 0, 0, 0);
|
||||
|
||||
if (Items.ParalyzingBlow.IsImmune(defender)) //Does it still do damage?
|
||||
if (Items.ParalyzingBlow.IsImmune(defender)) // Does it still do damage?
|
||||
{
|
||||
attacker.SendLocalizedMessage(1070804); // Your target resists paralysis.
|
||||
defender.SendLocalizedMessage(1070813); // You resist paralysis.
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace Server.Items
|
|||
/// </summary>
|
||||
public class TalonStrike : WeaponAbility
|
||||
{
|
||||
private static HashSet<Mobile> m_Table = new HashSet<Mobile>();
|
||||
private static readonly HashSet<Mobile> m_Table = new HashSet<Mobile>();
|
||||
|
||||
public override int BaseMana => 30;
|
||||
public override double DamageScalar => 1.2;
|
||||
|
|
@ -38,7 +38,7 @@ namespace Server.Items
|
|||
defender.FixedParticles(0x373A, 1, 17, 0x26BC, 0x662, 0, EffectLayer.Waist);
|
||||
|
||||
InternalTimer timer = new InternalTimer(defender,
|
||||
(int)(10.0 * (attacker.Skills.Ninjitsu.Value - 50.0) / 70.0 + 5)); //5 - 15 damage
|
||||
(int)(10.0 * (attacker.Skills.Ninjitsu.Value - 50.0) / 70.0 + 5)); // 5 - 15 damage
|
||||
|
||||
timer.Start();
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ namespace Server.Items
|
|||
private readonly double DamagePerTick;
|
||||
private double m_DamageRemaining;
|
||||
private double m_DamageToDo;
|
||||
private Mobile m_Defender;
|
||||
private readonly Mobile m_Defender;
|
||||
|
||||
public InternalTimer(Mobile defender, int totalDamage)
|
||||
: base(TimeSpan.Zero, TimeSpan.FromSeconds(0.25),
|
||||
|
|
@ -76,14 +76,14 @@ namespace Server.Items
|
|||
m_DamageToDo += DamagePerTick;
|
||||
|
||||
if (m_DamageRemaining <= 0 && m_DamageToDo < 1)
|
||||
m_DamageToDo = 1.0; //Confirm this 'round up' at the end
|
||||
m_DamageToDo = 1.0; // Confirm this 'round up' at the end
|
||||
|
||||
int damage = (int)m_DamageToDo;
|
||||
|
||||
if (damage > 0)
|
||||
{
|
||||
//m_Defender.Damage( damage, m_Attacker, false );
|
||||
m_Defender.Hits -= damage; //Don't show damage, don't disrupt
|
||||
// m_Defender.Damage( damage, m_Attacker, false );
|
||||
m_Defender.Hits -= damage; // Don't show damage, don't disrupt
|
||||
m_DamageToDo -= damage;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace Server.Items
|
|||
{
|
||||
public abstract class WeaponAbility
|
||||
{
|
||||
public static WeaponAbility[] Abilities{ get; } = {
|
||||
public static WeaponAbility[] Abilities { get; } = {
|
||||
null,
|
||||
new ArmorIgnore(),
|
||||
new BleedAttack(),
|
||||
|
|
@ -81,7 +81,7 @@ namespace Server.Items
|
|||
|
||||
public static readonly WeaponAbility Disrobe = Abilities[30];
|
||||
|
||||
private static Dictionary<Mobile, WeaponAbilityContext> m_PlayersTable = new Dictionary<Mobile, WeaponAbilityContext>();
|
||||
private static readonly Dictionary<Mobile, WeaponAbilityContext> m_PlayersTable = new Dictionary<Mobile, WeaponAbilityContext>();
|
||||
|
||||
public virtual int BaseMana => 0;
|
||||
|
||||
|
|
@ -90,7 +90,7 @@ namespace Server.Items
|
|||
|
||||
public virtual bool RequiresSE => false;
|
||||
|
||||
public static Dictionary<Mobile, WeaponAbility> Table{ get; } = new Dictionary<Mobile, WeaponAbility>();
|
||||
public static Dictionary<Mobile, WeaponAbility> Table { get; } = new Dictionary<Mobile, WeaponAbility>();
|
||||
|
||||
public virtual bool ValidatesDuringHit => true;
|
||||
|
||||
|
|
@ -254,8 +254,6 @@ namespace Server.Items
|
|||
return false;
|
||||
}
|
||||
|
||||
#region Dueling
|
||||
|
||||
string option = null;
|
||||
|
||||
if (this is ArmorIgnore)
|
||||
|
|
@ -305,18 +303,15 @@ namespace Server.Items
|
|||
else if (this is ArmorPierce)
|
||||
option = "Armor Pierce";
|
||||
|
||||
|
||||
if (option != null && !DuelContext.AllowSpecialAbility(from, option, true))
|
||||
return false;
|
||||
|
||||
#endregion
|
||||
|
||||
return CheckSkills(from) && CheckMana(from, false);
|
||||
}
|
||||
|
||||
public static bool IsWeaponAbility(Mobile m, WeaponAbility a) =>
|
||||
a == null || !m.Player || m.Weapon is BaseWeapon weapon &&
|
||||
(weapon.PrimaryAbility == a || weapon.SecondaryAbility == a);
|
||||
a == null || !m.Player || (m.Weapon is BaseWeapon weapon &&
|
||||
(weapon.PrimaryAbility == a || weapon.SecondaryAbility == a));
|
||||
|
||||
public static WeaponAbility GetCurrentAbility(Mobile m)
|
||||
{
|
||||
|
|
@ -425,7 +420,7 @@ namespace Server.Items
|
|||
|
||||
private class WeaponAbilityTimer : Timer
|
||||
{
|
||||
private Mobile m_Mobile;
|
||||
private readonly Mobile m_Mobile;
|
||||
|
||||
public WeaponAbilityTimer(Mobile from) : base(TimeSpan.FromSeconds(3.0))
|
||||
{
|
||||
|
|
@ -444,7 +439,7 @@ namespace Server.Items
|
|||
{
|
||||
public WeaponAbilityContext(Timer timer) => Timer = timer;
|
||||
|
||||
public Timer Timer{ get; }
|
||||
public Timer Timer { get; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue