RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Wondering why BaseWeapon.InDoubleStrike is a static property

Wind

Wanderer
Wondering why BaseWeapon.InDoubleStrike is a static property

When I'm looking to find how weapon's life leech is calculated, I discover that BaseWeapon.InDoubleStrike is a static property.

[code:1]
private static bool m_InDoubleStrike;
public static bool InDoubleStrike
{
get{ return m_InDoubleStrike; }
set{ m_InDoubleStrike = value; }
}
[/code:1]

It's used in the Scripts\Items\Weapons\Abilities\DoubleStrike.cs:

[code:1]
public override void OnHit( Mobile attacker, Mobile defender, int damage )
....
BaseWeapon.InDoubleStrike = true;
attacker.RevealingAction();
attacker.NextCombatTime = DateTime.Now + weapon.OnSwing( attacker, defender );
BaseWeapon.InDoubleStrike = false;
....
[/code:1]

I'm not sure this is a actual bug because I still don't have idea how weapons are actually spawned, but seems that using doulbe strike affects all weapons? This sounds almost impossible...but I'm curious...
 

Phantom

Knight
Combat Move methods/properties are static because more then one object have that given combat move.

This isn't a bug btw.
 
Top