Fixes code according to modern code style. Fixes a few expression bugs.
This commit is contained in:
parent
89eea25e5f
commit
970fd563b2
3324 changed files with 441118 additions and 433755 deletions
|
|
@ -3,73 +3,75 @@ using System.Collections;
|
|||
|
||||
namespace Server.Spells.Chivalry
|
||||
{
|
||||
public class DivineFurySpell : PaladinSpell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Divine Fury", "Divinum Furis",
|
||||
-1,
|
||||
9002
|
||||
);
|
||||
public class DivineFurySpell : PaladinSpell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Divine Fury", "Divinum Furis",
|
||||
-1,
|
||||
9002
|
||||
);
|
||||
|
||||
public override TimeSpan CastDelayBase => TimeSpan.FromSeconds( 1.0 );
|
||||
private static Hashtable m_Table = new Hashtable();
|
||||
|
||||
public override double RequiredSkill => 25.0;
|
||||
public override int RequiredMana => 15;
|
||||
public override int RequiredTithing => 10;
|
||||
public override int MantraNumber => 1060722; // Divinum Furis
|
||||
public override bool BlocksMovement => false;
|
||||
public DivineFurySpell(Mobile caster, Item scroll) : base(caster, scroll, m_Info)
|
||||
{
|
||||
}
|
||||
|
||||
public DivineFurySpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
|
||||
{
|
||||
}
|
||||
public override TimeSpan CastDelayBase => TimeSpan.FromSeconds(1.0);
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
if ( CheckSequence() )
|
||||
{
|
||||
Caster.PlaySound( 0x20F );
|
||||
Caster.PlaySound( Caster.Female ? 0x338 : 0x44A );
|
||||
Caster.FixedParticles( 0x376A, 1, 31, 9961, 1160, 0, EffectLayer.Waist );
|
||||
Caster.FixedParticles( 0x37C4, 1, 31, 9502, 43, 2, EffectLayer.Waist );
|
||||
public override double RequiredSkill => 25.0;
|
||||
public override int RequiredMana => 15;
|
||||
public override int RequiredTithing => 10;
|
||||
public override int MantraNumber => 1060722; // Divinum Furis
|
||||
public override bool BlocksMovement => false;
|
||||
|
||||
Caster.Stam = Caster.StamMax;
|
||||
public override void OnCast()
|
||||
{
|
||||
if (CheckSequence())
|
||||
{
|
||||
Caster.PlaySound(0x20F);
|
||||
Caster.PlaySound(Caster.Female ? 0x338 : 0x44A);
|
||||
Caster.FixedParticles(0x376A, 1, 31, 9961, 1160, 0, EffectLayer.Waist);
|
||||
Caster.FixedParticles(0x37C4, 1, 31, 9502, 43, 2, EffectLayer.Waist);
|
||||
|
||||
Timer t = (Timer)m_Table[Caster];
|
||||
Caster.Stam = Caster.StamMax;
|
||||
|
||||
t?.Stop();
|
||||
Timer t = (Timer)m_Table[Caster];
|
||||
|
||||
int delay = ComputePowerValue( 10 );
|
||||
t?.Stop();
|
||||
|
||||
// TODO: Should caps be applied?
|
||||
if ( delay < 7 )
|
||||
delay = 7;
|
||||
else if ( delay > 24 )
|
||||
delay = 24;
|
||||
int delay = ComputePowerValue(10);
|
||||
|
||||
m_Table[Caster] = t = Timer.DelayCall( TimeSpan.FromSeconds( delay ), new TimerStateCallback( Expire_Callback ), Caster );
|
||||
Caster.Delta( MobileDelta.WeaponDamage );
|
||||
// TODO: Should caps be applied?
|
||||
if (delay < 7)
|
||||
delay = 7;
|
||||
else if (delay > 24)
|
||||
delay = 24;
|
||||
|
||||
BuffInfo.AddBuff(Caster, new BuffInfo(BuffIcon.DivineFury, 1060589, 1075634, TimeSpan.FromSeconds(delay), Caster));
|
||||
}
|
||||
m_Table[Caster] = t = Timer.DelayCall(TimeSpan.FromSeconds(delay), new TimerStateCallback(Expire_Callback),
|
||||
Caster);
|
||||
Caster.Delta(MobileDelta.WeaponDamage);
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
BuffInfo.AddBuff(Caster,
|
||||
new BuffInfo(BuffIcon.DivineFury, 1060589, 1075634, TimeSpan.FromSeconds(delay), Caster));
|
||||
}
|
||||
|
||||
private static Hashtable m_Table = new Hashtable();
|
||||
FinishSequence();
|
||||
}
|
||||
|
||||
public static bool UnderEffect( Mobile m )
|
||||
{
|
||||
return m_Table.Contains( m );
|
||||
}
|
||||
public static bool UnderEffect(Mobile m)
|
||||
{
|
||||
return m_Table.Contains(m);
|
||||
}
|
||||
|
||||
private static void Expire_Callback( object state )
|
||||
{
|
||||
Mobile m = (Mobile)state;
|
||||
private static void Expire_Callback(object state)
|
||||
{
|
||||
Mobile m = (Mobile)state;
|
||||
|
||||
m_Table.Remove( m );
|
||||
m_Table.Remove(m);
|
||||
|
||||
m.Delta( MobileDelta.WeaponDamage );
|
||||
m.PlaySound( 0xF8 );
|
||||
}
|
||||
}
|
||||
}
|
||||
m.Delta(MobileDelta.WeaponDamage);
|
||||
m.PlaySound(0xF8);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue