Відповідь: ПОМОГИТЕ
Стосовно затримки при використанні зброї. Тут скорочено, без зайвого, що не діє і без того що поки що не впроваджено і стосується класової системи ( ClassBonuses.WeaponTimeSpanDelay )
Стосовно затримки при використанні зброї. Тут скорочено, без зайвого, що не діє і без того що поки що не впроваджено і стосується класової системи ( ClassBonuses.WeaponTimeSpanDelay )
Код:
public virtual TimeSpan GetDelay( Mobile m )
{
int speed = this.Speed;
if ( speed == 0 )
return TimeSpan.FromHours( 1.0 );
double delayInSeconds;
if ( Core.SE )
{
/*
* This is likely true for Core.AOS as well... both guides report the same
* formula, and both are wrong.
* The old formula left in for AOS for legacy & because we aren't quite 100%
* Sure that AOS has THIS formula
*/
int bonus = AosAttributes.GetValue( m, AosAttribute.WeaponSpeed );
if ( Spells.Chivalry.DivineFurySpell.UnderEffect( m ) )
bonus += 10;
// Bonus granted by successful use of Honorable Execution.
bonus += HonorableExecution.GetSwingBonus( m );
if( DualWield.Registry.Contains( m ) )
bonus += ((DualWield.DualWieldTimer)DualWield.Registry[m]).BonusSwingSpeed;
if( Feint.Registry.Contains( m ) )
bonus -= ((Feint.FeintTimer)Feint.Registry[m]).SwingSpeedReduction;
int discordanceEffect = 0;
// Discordance gives a malus of -0/-28% to swing speed.
if ( SkillHandlers.Discordance.GetEffect( m, ref discordanceEffect ) )
bonus -= discordanceEffect;
// Mod KOCTa 17.12.2008 ClassSystem v.1.0
// if ( m is PlayerMobile && ClassSpecification.Enabled )
// {
// return ClassBonuses.WeaponTimeSpanDelay( (PlayerMobile) m, this, bonus );
// }
if ( bonus > 60 )
bonus = 60;
speed = (int)Math.Floor( speed * (bonus + 100.0) / 100.0 );
if ( speed <= 0 )
speed = 1;
int ticks = (int)Math.Floor( (80000.0 / ((m.Stam + 100) * speed)) - 2 );
// Swing speed currently capped at one swing every 1.25 seconds (5 ticks).
if ( ticks < 5 )
ticks = 5;
delayInSeconds = ticks * 0.25;
// Elf Ranged bonus - буде у класових бонусах
if ( atkWeapon.Type == WeaponType.Ranged && Core.ML && pmAttacker.Race == Race.Elf )
delayInSeconds = delayInSeconds * 0.8;
// end Mod KOCTa 17.12.2008 ClassSystem v.1.0
}
else
....
return TimeSpan.FromSeconds( delayInSeconds );
}